Back to exam

Certified Data Engineer Professional Cheatsheet

Databricks Certified Data Engineer Professional

Download free PDF

Lakehouse architecture and Delta Lake

Layers, models and serving contracts

  • **Bronze** preserves replayable source payloads and ingestion metadata. **Silver** validates, deduplicates and enriches records. **Gold** serves business aggregates and reporting models.
  • Retain raw Kafka **key, value, topic, partition, offset and timestamp** when replay and diagnosis matter. Add ingestion time to measure delay; newly added metadata is not backfilled automatically.
  • **SCD Type 1** overwrites current attributes. **SCD Type 2** keeps effective-dated history with business keys and validity boundaries. **Type 0** preserves original values; **Type 3** stores selected prior attributes in columns.
  • Keep an immutable **CDC history** separately from a current-state table when every intermediate change matters. A latest-record merge intentionally collapses intermediate states.
  • **Views** store query definitions and can project, rename or restrict fields without another data copy. **Materialized results** precompute costly joins and aggregates for repeated dashboard reads.
  • Define a consistent **fact grain**, dimension keys and business measures. A date dimension can precompute fiscal periods, quarters, weekdays and holidays for reusable reporting.

Transactions, tables and metadata

  • **Delta Lake** combines Parquet data files with a transaction log for ACID table changes, schema enforcement and snapshot reads. JSON or CSV inputs are parsed before writing Delta tables.
  • **Optimistic concurrency** validates changes at commit time. Concurrent operations may conflict; isolate write ranges where practical and make retry logic safe.
  • Treat an ordinary Delta write as a **table transaction**. A multi-task workflow does not provide automatic rollback across its tables or previously committed statements.
  • **Managed tables** delegate data lifecycle to the catalog; **external tables** register data at an explicit location. A schema storage location alone does not make each table external.
  • **DROP TABLE** removes an external table registration while leaving its files. Managed-table deletion follows catalog lifecycle rules; a rename changes the registration rather than copying data.
  • **DESCRIBE EXTENDED** exposes schema comments and table metadata; **DESCRIBE DETAIL** summarizes storage and table properties; **SHOW TBLPROPERTIES** lists properties; **DESCRIBE HISTORY** lists commits and operation metrics.

Time travel, retention and physical deletion

  • **VERSION AS OF** and **TIMESTAMP AS OF** query retained snapshots. Time travel needs both the required transaction history and referenced data files.
  • **DELETE**, **UPDATE** and **MERGE** change the active snapshot. Historical files can remain readable until retention and cleanup permit their removal.
  • **VACUUM** removes eligible unreferenced data files; it does not compact active files. The default deleted-file retention is **seven days**; cleanup occurs when VACUUM runs, not exactly at the threshold.
  • Set **delta.deletedFileRetentionDuration** for the persistent file-retention policy. **delta.logRetentionDuration** governs log history separately. Keep retention longer than required reader, stream and recovery horizons.
  • **Deletion vectors** mark removed rows without immediately rewriting the original Parquet files. Physical erasure may require **REORG TABLE ... APPLY (PURGE)** followed by retention-aware VACUUM.
  • Propagate erasure through derived tables, retained copies and backups as required. **Time travel is retention-bound recovery**, while an explicit history model supports durable business auditing.

Schema contracts and isolated copies

  • **Schema enforcement** rejects incompatible writes. **mergeSchema** permits supported additive evolution; **overwriteSchema** replaces a schema during an overwrite. Neither invents values for old records.
  • Adding a nullable column generally exposes **NULL** for older rows without rewriting every file. Supported nested-field evolution depends on the operation, table features and runtime.
  • **NOT NULL** and **CHECK** enforce data constraints. Adding a CHECK validates existing data; a violating write fails its transaction. Declare null requirements explicitly alongside range predicates.
  • **Primary and foreign keys** are informational rather than duplicate or referential-integrity enforcement. Implement validation and deduplication in the pipeline.
  • **SHALLOW CLONE** copies metadata and references existing files; **DEEP CLONE** copies data for stronger storage independence. Neither is a live synchronization mechanism.
  • Shallow-clone retention behavior depends on catalog and table support. Source-file cleanup can break legacy or external shallow clones; use an independent copy when its lifetime must outlast source retention.

Incremental ingestion and Structured Streaming

Auto Loader discovery and schema handling

  • **Auto Loader** uses the **cloudFiles** source to incrementally discover and process files. Directory listing and supported file-event mechanisms offer different discovery cost and scale.
  • Specify **cloudFiles.format** for the underlying format, such as JSON or CSV. **cloudFiles.schemaLocation** persists inferred schema; **checkpointLocation** tracks stream progress and recovery.
  • **Schema inference** is a starting point, not a business contract. Use explicit types or schema hints where downstream consumers require dependable numeric, timestamp or nested types.
  • **cloudFiles.schemaEvolutionMode = addNewColumns** records newly discovered fields and can stop the stream for restart. Coordinate restart policy with destination schema evolution.
  • **_rescued_data** captures values that do not match the inferred or declared schema, including type or field-name mismatches. Well-formed JSON can still violate the expected schema.
  • Separate **malformed syntax**, schema mismatches and business-rule failures. Preserve raw payload, file metadata and failure reason when routing invalid records to quarantine.
  • **cloudFiles.maxBytesPerTrigger** bounds ingestion approximately by bytes; it is a soft limit because files are processed whole. **maxFilesPerTrigger** limits file count instead.
  • Use **binaryFile** ingestion for binary assets and path filters for required extensions. **COPY INTO** provides file-tracked SQL ingestion for suitable bounded workloads; Auto Loader supports scalable incremental discovery.

Checkpoints, triggers and delivery guarantees

  • **Structured Streaming** treats incoming events as rows of an unbounded table and incrementally executes a query, normally through micro-batches.
  • Give every query its own durable **checkpoint**. Independent streams can write one Delta destination, but must not share checkpoints. Checkpoints store offsets, commit progress and state metadata.
  • Exactly-once results depend on **replayable input**, checkpoint recovery and a compatible transactional sink. They do not remove duplicate business events delivered at different source offsets.
  • **processingTime** sets a target trigger interval. Micro-batches do not overlap within one query; a batch that exceeds the interval delays the next one. Tune batch size and compute against observed latency.
  • **AvailableNow** drains the available input in one or more micro-batches and stops. Scheduled incremental runs can release compute between executions when the freshness SLA permits.
  • A shorter trigger can reduce batch size but increases polling and scheduling overhead. Longer triggers can lower storage-request cost; include startup and processing time in end-to-end freshness.
  • Checkpoint-compatible changes are limited. Changing stateful grouping keys or aggregate state often requires a **new checkpoint and controlled rebuild**; plan sink deduplication before replay.

Windows, watermarks and output modes

  • **Event time** is when the event occurred; **processing time** is when it is handled. Track both when measuring late arrivals and ingestion latency.
  • **window(event_time, "5 minutes")** creates tumbling windows. A shorter slide creates overlapping windows; a fourth start-time argument can offset boundaries. Window results contain **start** and **end**.
  • **withWatermark(event_time, delay)** lets supported stateful operations evict old state based on observed event time. It does not hold every event for the full delay or guarantee handling of arbitrarily late data.
  • Place the watermark before the stateful operation and use the relevant event-time column. For windowed aggregates, state can be removed after the watermark passes the window end.
  • **Append** emits finalized new results when supported. **Update** emits changed result rows. **Complete** emits the full result table; it is not an incremental change feed.
  • Watermark-bounded **deduplication** forgets older keys. Use a durable unique-key merge when duplicates may arrive beyond the retained state horizon.

Streaming joins and mutable sources

  • **Stream-static joins** enrich arriving events with lookup data without retaining both sides as streaming join state. Supported outer joins depend on which side is streaming; full outer stream-static joins are unsupported.
  • A static Delta lookup can be refreshed for later micro-batches on Databricks, but changed dimension rows do not automatically re-enrich facts already emitted. Recompute affected results when that is required.
  • **Stream-stream joins** retain matching state. Add event-time watermarks and a bounded time-range condition so state can expire; outer joins may wait before producing unmatched rows.
  • A plain **Delta streaming read** suits append-only changes. Updates and deletes require an explicit strategy such as CDF; **skipChangeCommits** skips modifying commits rather than applying their row changes.
  • For mutable inputs, recompute affected aggregates or apply correct change deltas. Appending another complete aggregate snapshot can double-count; a timestamp filter can miss late or corrected records.

Declarative pipelines, quality and CDC

Streaming tables and materialized views

  • **Lakeflow Spark Declarative Pipelines** declares datasets and dependencies so the platform can plan execution, manage recovery and expose an auditable pipeline graph.
  • Use **streaming tables** for incremental ingestion and supported streaming transformations. Use **materialized views** for maintained query results, including complex joins and aggregates over changing sources.
  • A materialized-view refresh can be incremental when eligible; do not assume every query can avoid full recomputation. A logical view computes its query when read rather than storing refreshed results.
  • Keep dataset definition functions **declarative and free of side effects**. The planner may evaluate them multiple times; return DataFrames instead of running writes or collecting data inside definitions.
  • For generated tables, use a **factory function or bound parameters** so each definition captures its own configuration. Late-bound loop variables can make every table use the final loop value.
  • **pipelines.reset.allowed = false** protects a table from full-refresh reset. Protecting the raw layer preserves data unavailable upstream; downstream recomputation still needs an explicit refresh plan.

Quality policies and quarantine

  • **Expectations** name row-level SQL conditions. **Warn/retain** records metrics while keeping invalid rows; **drop** excludes invalid rows; **fail** stops the affected flow rather than silently discarding data.
  • Reuse rules as a **name-to-predicate dictionary** loaded from an importable module or governed configuration. Apply grouped rules with expectation helpers rather than relying on shared notebook globals.
  • Build separate **valid and quarantine branches** from a common classified input. Keep failure reasons and original fields in quarantine so invalid records remain available for analysis.
  • A drop expectation alone does not create a quarantine dataset. A warn expectation alone still admits invalid data. Check both **NULL handling** and value ranges explicitly.
  • To check cross-table completeness, derive a validation dataset with a **left join or anti join** from expected keys to actual keys. Apply expectations to the resulting missing-key indicator.
  • Use the pipeline **event log**, filter **flow_progress**, and parse **details.flow_progress.data_quality.expectations** for per-dataset passed and failed counts. Restrict analysis to the relevant update.
  • Separate low-priority quarantine processing from latency-critical clean-data compute when independent failure recovery matters. **AvailableNow** or scheduled batch processing can limit quarantine cost.

MERGE and change data feed

  • **MERGE INTO** matches source rows to target keys and applies explicit update, delete and insert clauses. Deduplicate the source batch before merging so multiple rows do not ambiguously update one target.
  • For insert-only deduplication, match the **complete business key** and insert only unmatched rows. Deduplicating one batch does not check prior target data by itself.
  • Select the latest source change per key using a trustworthy **sequence** with deterministic tie-breaking. Guard against older arriving events overwriting newer target values.
  • Enable **delta.enableChangeDataFeed = true** to expose row changes from supported commits. CDF includes **_change_type**, **_commit_version** and **_commit_timestamp**.
  • CDF change types include **insert**, **delete**, **update_preimage** and **update_postimage**. Use postimages for new values and preimages when retracting prior contributions.
  • Consume CDF with **readChangeFeed** and a checkpoint or explicit commit boundaries. Repeated unbounded batch reads can replay the same changes; CDF is retention-bound, so archive it for durable audit history.
  • **foreachBatch** can merge micro-batches into Delta, but its callback has at-least-once execution semantics. Make writes idempotent and handle empty batches; separate table writes do not become one transaction.

Sequenced CDC and delete propagation

  • **AUTO CDC** applies ordered change events to SCD Type 1 or Type 2 targets. Define keys, a sequence expression, deletion conditions and the columns to retain.
  • Use a composite sequence such as **STRUCT(event_timestamp, sequence_id)** when timestamps can tie. Event ordering should reflect source change order rather than arrival order.
  • Declare **APPLY AS DELETE** or the corresponding Python predicate for delete events. Configure retained tombstones to cover expected out-of-order arrivals and pipeline delays.
  • To propagate updates and deletes from a mutable Delta source, read its **CDF**, map change types and sequence metadata, then apply those events downstream. Skipping change commits cannot synchronize deletes.
  • Keep replayable raw change history when the upstream stream has short retention. Neither a current-state SCD Type 1 table nor a streaming checkpoint preserves every original source event.

Spark performance and table layout

Execution plans, shuffles and joins

  • **Transformations** build a lazy plan; actions such as count, collect and writes trigger execution. **display** also starts work and can distort interactive timing comparisons.
  • **Narrow transformations** can operate within partitions. Joins, grouping, sorting and repartitioning often create **shuffles** and stage boundaries; network and serialization costs can dominate.
  • Use **EXPLAIN**, the Spark UI **SQL/DataFrame** plan and SQL **Query Profile** to examine scan filters, join strategies and expensive operators. Inspect runtime metrics rather than the parsed plan alone.
  • **broadcast(df)** marks a small relation for distribution to workers. It can avoid shuffling the large side of an eligible join, but must fit worker memory; it is not a persistent table cache.
  • **Adaptive Query Execution** can coalesce shuffle partitions, adapt join choices and mitigate skew using runtime statistics. Avoid assuming one join type is always fastest.
  • For interval lookups, a supported **range-join optimization** bins values to reduce candidate comparisons. Choose the bin size from interval widths and density; a broadcast hint alone may still leave an expensive nested-loop comparison.

Partition sizing, skew and spill

  • **spark.sql.files.maxPartitionBytes** influences file-scan partition sizing. **spark.sql.shuffle.partitions** controls shuffle parallelism; AQE advisory partition size influences adaptive shuffle sizing.
  • **repartition** reshuffles to redistribute data or increase parallelism. **coalesce** usually reduces partition count without a full shuffle, but can leave uneven work and reduce throughput.
  • Input partition bytes do not guarantee output file bytes: filters, compression, row width and output partitioning change sizes. Avoid claiming an exact Parquet file size from an input setting.
  • **Skew** often appears as a maximum task duration far above the median, with disproportionate input or shuffle bytes. Inspect key frequencies, partition sizes and task metrics.
  • **Salting** splits hot keys into partial aggregates, then recombines them by the original key. Preserve aggregation semantics: combine sums and counts for averages rather than averaging partial averages.
  • **Disk spill** indicates working data exceeded available execution memory. Reduce per-task data, increase appropriate shuffle parallelism, reduce wide intermediates or use more memory per concurrent task.
  • More local disk can absorb spill without fixing its cause. Choose executor size and cores per executor from memory, shuffle and failure behavior; equal total cores and RAM do not guarantee equal performance.

Driver limits, caching and measurement

  • **collect()**, large local pandas conversions and driver-side loops can exhaust driver memory. Keep processing distributed and limit sampled results before returning them to the notebook.
  • **%sh** runs on the driver; it does not automatically parallelize a script across workers. Low overall CPU can hide a saturated driver, so compare driver and worker metrics separately.
  • The **Storage** tab shows cached partitions and storage use. With **MEMORY_ONLY**, uncached or evicted partitions are recomputed; compare cached versus total partitions rather than expecting disk-backed cache.
  • Cache only reused, expensive intermediates that fit the workload. Unpersist when finished. Distinguish Spark persistence, disk caching and SQL result caching when interpreting repeated runs.
  • Compare representative runs with consistent inputs, compute, actions and cache state. **Wall-clock duration** measures elapsed latency; aggregated task time sums parallel work and can exceed elapsed time.
  • Use **stage metrics** for skew and spill, **executor metrics/logs** for memory and failures, and the **cluster event log** for resizing and lifecycle events. Correlate timestamps before attributing cause.

Data skipping and file maintenance

  • **Partition pruning** excludes directories using partition predicates. **Data skipping** uses file-level statistics in Delta metadata, such as minimum, maximum and null counts, to exclude impossible matches.
  • Skipping requires useful statistics and selective value ranges. A nonpartition column can still support skipping; arbitrary substring searches in free text are not a full-text index.
  • Statistics coverage depends on table configuration and managed-table optimization. Ensure frequently filtered columns have statistics; flatten selected nested fields when that improves schema usability and layout.
  • **OPTIMIZE** compacts active small files. **Optimized writes** redistribute data before writing to reduce small-file creation; **auto compaction** combines small files after writes.
  • File-size targets can adapt to workload and table settings. Frequent **MERGE** workloads may benefit from smaller files than scan-heavy tables; an earlier OPTIMIZE does not fix all future write sizes.
  • **ZORDER BY** improves colocation for selected filters on compatible non-liquid tables. Avoid too many dimensions; Z-ordering and compaction are maintenance work, while VACUUM removes obsolete files.
  • For Hive-style partitioning, choose stable, commonly filtered columns with enough data per partition. High-cardinality identifiers and fine-grained timestamps can create excessive directories and small files.

Liquid clustering and interoperability

  • **Liquid clustering** uses clustering keys to improve data layout without fixed Hive-style partitions. It suits changing access patterns, skew and high-cardinality filter keys.
  • Clustering keys can change without immediately rewriting all historical data. Run **OPTIMIZE** to incrementally improve layout; supported writes may cluster data, but do not assume every write is fully clustered.
  • Liquid clustering replaces partitioning and Z-ordering for a table. Choose keys from selective filters and merge access patterns; check runtime and protocol compatibility before enabling features.
  • **Predictive optimization** automates supported maintenance, including **OPTIMIZE**, **VACUUM** and **ANALYZE**, for eligible Unity Catalog managed tables. Automatic key selection can support adaptive clustering.
  • **Deletion vectors** reduce rewrite pressure for supported row changes. They require compatible readers and writers; logical deletion, compaction and physical purge remain distinct operations.
  • **UniForm** generates compatible metadata so supported Iceberg clients can read Delta-backed data without maintaining a separate full data copy. Check enabled table features and external-reader capabilities.

Development, deployment and workflow recovery

Reusable Python and test strategy

  • Extract transformations into importable functions that accept and return DataFrames. **DataFrame.transform(fn)** composes small transformations and makes unit tests easier to isolate.
  • **sys.path** lists module search locations. Package reusable Python code as **wheels** with pinned dependencies; an exported Python notebook begins with **# Databricks notebook source**.
  • **%pip install** provides notebook-scoped dependencies on supported compute. A driver-only shell installation is not a reliable distributed dependency strategy.
  • For air-gapped deployments, stage approved wheels and all transitive dependencies in reachable governed storage or an internal package repository. Attach dependencies through job or compute configuration for reproducibility.
  • **Unit tests** isolate functions and edge cases. **Integration tests** validate subsystem interactions. **End-to-end tests** exercise realistic complete workflows; none alone guarantees all code paths.
  • Use small deterministic fixtures, schema checks and expected rows, including nulls, ties, duplicates and late events. Separate test catalogs and storage from production; production-like test data must satisfy privacy requirements.

Windows, UDFs and model scoring

  • **dense_rank()** assigns equal ranks to ties without gaps. Aggregate sales to the intended salesperson grain before ranking within each region by descending totals.
  • For a cumulative total, use **partitionBy(customer_id)**, a deterministic order and **rowsBetween(unboundedPreceding, currentRow)**. Add a tie-breaker when event timestamps repeat.
  • **ROWS** frames count ordered rows; **RANGE** frames group by order values and can include all peers with the same value. Choose the frame deliberately for financial totals.
  • Prefer **built-in Spark expressions** before Python UDFs. **Pandas UDFs** use Arrow batches to reduce JVM/Python conversion overhead, but still have boundary and memory costs.
  • **groupBy(...).applyInPandas(...)** can process a whole group with local state; sort within groups when order matters. Large groups can exceed memory, and Python globals do not provide durable cross-batch state.
  • Load a tracked **MLflow** model as an appropriate Spark UDF and select its prediction column with record keys. Append prediction date and model identity when comparing scoring history; use CDF to score only relevant changed rows.

Git isolation and Asset Bundles

  • Give each developer a personal **Git folder** and feature branch against the shared remote. Fetch or pull remote changes before selecting a newly published branch; review and resolve conflicts before merging.
  • Use protected main branches and reviewed changes for releases. A development **USE catalog.schema** statement alone does not prevent writes through another fully qualified name or storage path.
  • **Databricks Asset Bundles** define deployable jobs, pipelines, code and permissions in versioned configuration. Use targets to separate environment settings and deployed identities.
  • For an existing bundle project, the CI sequence is **bundle validate**, **bundle deploy**, then **bundle run**. **bundle run my_project_job -t prod** runs the deployed resource in that target context.
  • Generating configuration for an existing job does not establish its deployment identity. **bundle deployment bind** associates a resource key with the existing remote job before managing it in place.
  • Declare job ACLs and resource grants explicitly. An application service principal needs **USE CATALOG**, **USE SCHEMA**, and the necessary **READ VOLUME / WRITE VOLUME** privileges for a governed volume.

Job definitions, run identity and parameters

  • **jobs/create** creates a persistent definition; **jobs/run-now** starts an existing job; **jobs/runs/submit** submits a one-time run. Repeated creates can make duplicate job definitions.
  • **jobs/get** retrieves configuration and task paths. **jobs/runs/list** finds executions; **jobs/runs/get** retrieves a run. Request repair history when needed rather than confusing job identity with run identity.
  • **job_id** identifies the definition; **run_id** identifies an execution. Multi-task runs also have task-run identifiers, while **task_key** identifies a task in the workflow definition.
  • Notebook task parameters are available through **dbutils.widgets.get(name)**; define an appropriate widget default for interactive use. Python script arguments and Spark configuration are different parameter channels.
  • A completed run is not necessarily successful. Filter runs by the intended **start-time interval**, inspect lifecycle and result state, and account for timezone boundaries before launching dependent external work.
  • Separate the **API caller**, job owner and **run-as identity**. Audit records attribute management requests to their authenticated principal; execution permissions depend on the configured run identity.

Task graphs, repair and cost controls

  • **Task dependencies** define execution order and run conditions. Default success dependencies skip downstream work after failure; independent branches can complete and retain committed outputs.
  • **Repair run** reruns selected failed or dependent tasks after correcting code, parameters or compute configuration. Persist the configuration fix for future scheduled runs as well.
  • Configure task retries, timeouts and failure notifications. For continuous ingestion, restart from the existing checkpoint and control **maximum concurrent runs** to prevent overlapping instances.
  • **For each** tasks iterate over configurable inputs with per-iteration visibility and bounded concurrency. **If/else** tasks route execution from supported task values or parameters; validate reference names.
  • Choose scheduled job compute or supported serverless execution when work can finish and release resources. Always-on streams trade lower latency for continuous cost; pools reduce startup time but idle infrastructure can still cost money.
  • Compute policies constrain instance types, worker counts, libraries and supported settings. Use a compatible **standard or dedicated access mode** for the workload and Unity Catalog; policy compliance is separate from table privileges.
  • Retain operational evidence deliberately: job-run UI history is not a permanent audit archive. Export required results, logs and metrics before service retention expires; plan log access separately from notebook access.

Unity Catalog governance, sharing and observability

Hierarchy, ownership and least privilege

  • **Unity Catalog** organizes **catalog.schema.object**. To read a table, grant **USE CATALOG**, **USE SCHEMA** and **SELECT**; creation and modification require their corresponding privileges.
  • Applicable privileges granted on a catalog or schema **inherit to current and future child objects**. USE privileges permit traversal and do not themselves authorize data reads.
  • **Ownership** provides management authority at an object scope. Owning a catalog or schema is not the same as automatically holding SELECT on every table, though the owner can manage appropriate child access.
  • **MANAGE** delegates privilege administration; **ALL PRIVILEGES** does not mean ownership or include every administrative privilege. Grant only the data and management capabilities required.
  • Separate catalogs or schemas for environments, domains and sensitivity tiers. Restrict underlying storage credentials too, so direct file access cannot bypass intended table governance.
  • Workspace object permissions, compute permissions, secret ACLs and data privileges are separate controls. **CAN RESTART** supports starting/restarting and attaching to existing compute; **CAN READ** on notebooks permits review without editing or execution.
  • For jobs, use **CAN VIEW**, **CAN MANAGE RUN** or **CAN MANAGE** according to need. A job has one owner principal rather than a group owner; sensitive driver-log access can require additional permission and configuration.

Row filters, masks and stored PII

  • **Row filters** use a Boolean SQL function to restrict visible records. **Column masks** transform selected field values at query time; both can be applied to the same table where supported.
  • Apply policies with **ALTER TABLE ... SET ROW FILTER** and **ALTER TABLE ... ALTER COLUMN ... SET MASK**. Use centrally managed functions and account-group membership checks for consistent authorization.
  • **Dynamic views** can project approved columns, alias names, filter rows and redact fields using caller identity. Grant consumers the governed interface and prevent unintended access to the base table.
  • **Query-time masking does not remove stored PII**. If raw identifiers must never be stored, transform them before the first persisted write across both batch and streaming paths.
  • **Hashing** can provide stable fixed-length pseudonyms, but predictable identifiers remain vulnerable to guessing. Pseudonymized data can remain personal data; retain only the approved linkage and protect any mapping.
  • Apply privacy transformations consistently to nested payloads, derived datasets, predictions and sandbox copies. A binary payload or renamed identifier is still sensitive when its contents identify people.

Secrets, automation and storage boundaries

  • **Secret scopes** group credentials with ACLs. Grant **READ** on a scope containing only the credentials a team requires; MANAGE is for administration, not normal credential use.
  • **databricks secrets put-secret SCOPE KEY** stores a secret; **dbutils.secrets.get(scope, key)** retrieves its value for code. Notebook output redaction reduces accidental display but is not an exfiltration boundary.
  • Prefer a dedicated **service principal** for automation. **OAuth workload identity federation** can exchange trusted workload identity for short-lived tokens without a long-lived stored client secret.
  • Use **Unity Catalog volumes**, external locations and storage credentials for governed file access. DBFS root and mounts are legacy patterns; a mount is a storage alias rather than an independent security boundary.
  • Keep data processing close to its cloud storage region to reduce network latency and transfer cost. Rate limits and object-storage request costs remain relevant even when Spark compute is available.

Sharing and federated queries

  • **Delta Sharing** exposes governed read access without handing recipients write permission to the provider table. **Shares**, **recipients** and grants control distribution.
  • **Databricks-to-Databricks sharing** integrates with recipient Unity Catalog identities. **Open sharing** supports external clients through supported token or federated authentication; capabilities vary by client.
  • **CREATE SHARE** at metastore scope authorizes share creation. Adding objects and granting recipient access also require the relevant ownership and object privileges.
  • Share table **history** when supported recipient streaming or time travel is required; expose **CDF** for row changes where supported. Available history remains bounded by the provider retention policy.
  • Do not assume all object types or advanced table features are supported by every sharing client. Validate the needed read, history and streaming capabilities for the chosen recipient path.
  • **Lakehouse Federation** uses a Unity Catalog **connection** and **foreign catalog** to query supported external databases. Govern access in Unity Catalog and grant only the required source credentials.
  • Federated queries read source data without a separate ingestion copy. They still depend on source availability, network performance and source consistency semantics; they do not create a shared cross-system transaction snapshot.

Documentation, usage and actionable alerts

  • **Table and column comments**, tags and well-defined properties improve discovery. **ALTER TABLE ... SET TAGS** attaches metadata; labels do not enforce privacy unless an applicable policy uses them.
  • Catalog Explorer can assist with **AI-generated descriptions**. Review generated definitions against business meaning before treating them as documentation; statistical summaries are not field semantics.
  • **system.billing.usage** records billable quantities. Aggregate by usage date, workspace, SKU and usage unit; account for corrections and avoid summing incompatible units. Usage quantity alone is not monetary cost.
  • Use supported **query history** and **audit** system tables for user and workload attribution. Shared-warehouse usage cannot always be assigned precisely to users from billing rows alone; document the allocation method.
  • **SQL alerts** evaluate query results on a schedule. Compute the exact signal, then choose transition or repeat-notification behavior; refresh frequency and notification frequency are separate.
  • For combined quality thresholds, return an explicit Boolean or numeric flag with the intended **AND/OR** logic and handle an empty denominator. Row-level failures and dataset-wide percentages answer different questions.
  • For consecutive-day checks, aggregate into the required daily metric, verify every day in the required calendar span, then test each threshold. An average across three days does not prove three daily violations.
  • Use profile and pipeline metrics for **null rates, invalid records, freshness and throughput**. Check whether a percent metric uses a fraction or a 0-100 scale, and whether the current day is complete before alerting.