Databricks Certified Data Engineer & Generative AI Engineer — Lakehouse, Delta Lake, DLT & Unity Catalog
Advanced Databricks Lakehouse flashcards covering Delta Lake internals (_delta_log, ACID, Time Travel, VACUUM, OPTIMIZE, ZORDER, Liquid Clustering), Medallion Architecture, Auto Loader, Delta Live Tables (DLT expectations & CDC), Unity Catalog governance, and Mosaic AI Vector Search.
- Category
- Project Management, Agile & AI/Data Certifications — PMI PMP, PRINCE2 7th Ed., Scrum (PSM/CSPO) & ITIL 4 + AWS AI/ML, Databricks & Snowflake
- Level
- advanced
- Languages
- en → en
- Cards
- 32
- Markdown
- Databricks Certified Data Engineer & Generative AI Engineer — Lakehouse, Delta Lake, DLT & Unity Catalog (.md)
Flashcards (32)
| # | Front (Term / Question) | Back (Definition / Answer) | Example | Multiple-Choice Options |
|---|---|---|---|---|
| 1 | What is Delta Sharing in Databricks, and how does it enable cross-platform data sharing without data replication? | Delta Sharing is an open protocol for sharing live Delta tables, views, volumes, and models across clouds and platforms using pre-signed URLs without copying data. | A retail supplier shares a live `gold_inventory` table from Unity Catalog to an external partner's Pandas/Power BI environment via an open Delta Sharing token without duplicating S3 storage. |
|
| 2 | In Delta Live Tables (DLT), what is the architectural difference between a Streaming Table, a Materialized View, and a Temporary View? | A Streaming Table processes append-only streams incrementally once; a Materialized View (`LIVE TABLE`) maintains recomputed physical query results; a Temporary View (`LIVE VIEW`) is unpersisted. | In DLT SQL, `CREATE OR REFRESH STREAMING TABLE bronze_iot AS SELECT * FROM cloud_files(...)` ingests new files once, while `CREATE OR REFRESH LIVE TABLE gold_summary` maintains a materialized aggregation. |
|
| 3 | In Databricks Workflows (Lakeflow Jobs), how do Task Values (`dbutils.jobs.taskValues`), Repair Run, and Cluster types (Job Compute vs. All-Purpose Compute) work? | `taskValues` passes parameters across tasks; 'Repair Run' reruns only failed tasks; ephemeral Job Compute bills at a lower DBU rate than All-Purpose Compute. | If Task 4 of a 6-task nightly pipeline fails due to an API timeout, clicking 'Repair Run' in Databricks Workflows skips Tasks 1–3 and runs only Tasks 4–6 on automated Job Compute. |
|
| 4 | What are the four `cloudFiles.schemaEvolutionMode` options in Databricks Auto Loader, and what is the `_rescued_data` column? | `addNewColumns` (evolves schema on restart), `rescue` (routes unexpected fields into `_rescued_data`), `failOnNewColumns` (halts without evolving), and `none` (ignores new columns). | When an upstream microservice adds an unexpected `loyalty_tier` JSON field, Auto Loader in `addNewColumns` mode updates the schema in `schemaLocation` and restarts cleanly via Databricks Workflow retries. |
|
| 5 | What is Databricks Lakehouse Monitoring, and what three profile types can it compute on a Delta table or Model Serving Inference Table? | Time Series profile (windowed metrics by timestamp), Snapshot profile (full-table metrics), and Inference Log profile (model drift, prediction shift, and accuracy). | Attaching a Lakehouse Monitor with an `InferenceLog` profile to a Model Serving Inference Table automatically creates two metric Delta tables (`_profile_metrics` and `_drift_metrics`) and a Lakeview dashboard. |
|
| 6 | How do `OPTIMIZE`, `ZORDER BY`, and Liquid Clustering (`CLUSTER BY`) improve query performance in Delta Lake? | `OPTIMIZE` compacts small Parquet files; `ZORDER BY` co-locates multidimensional values for data skipping; Liquid Clustering (`CLUSTER BY`) incrementally clusters data without full rewrites. | Creating a table with `CREATE TABLE events CLUSTER BY (customer_id, event_date)` replaces static Hive partitioning and `ZORDER BY` with incremental, skew-resistant Liquid Clustering. |
|
| 7 | How does Delta Lake Change Data Feed (CDF) work when `delta.enableChangeDataFeed = true` is set on a table? | CDF records row-level `insert`, `update_preimage`, `update_postimage`, and `delete` events with commit versions, queryable via `table_changes('table', v1, v2)`. | Downstream Silver-to-Gold pipelines read `spark.readStream.format('delta').option('readChangeFeed', 'true').table('silver_users')` to propagate only modified user rows instead of scanning the entire table. |
|
| 8 | How are fine-grained Row Filters and Column Masks implemented in Databricks Unity Catalog (versus legacy Dynamic Views)? | Define SQL UDFs using `IS_ACCOUNT_GROUP_MEMBER()` and attach them directly to tables via `SET ROW FILTER` and `ALTER COLUMN ... SET MASK`. | Running `ALTER TABLE hr.employees ALTER COLUMN ssn SET MASK hr.mask_ssn` redacts SSN values for non-HR analysts directly on the base table without maintaining separate dynamic views. |
|
| 9 | What are the three Data Quality Expectation violation behaviors in Delta Live Tables (DLT)? | `EXPECT` retains invalid rows and logs metrics; `ON VIOLATION DROP ROW` (`expect_or_drop`) drops invalid rows; `ON VIOLATION FAIL UPDATE` (`expect_or_fail`) halts the pipeline. | In a Silver orders table, `CONSTRAINT valid_id EXPECT (order_id IS NOT NULL) ON VIOLATION DROP ROW` filters out corrupt records while recording the drop count in the DLT Event Log. |
|
| 10 | What is the three-level namespace hierarchy in Databricks Unity Catalog, and how does the Metastore relate to workspaces? | Unity Catalog uses `catalog.schema.table` (plus volumes, views, functions, and models) governed by a regional Metastore shared across multiple workspaces. | Querying `SELECT * FROM prod_catalog.finance_schema.gl_entries` accesses a centrally governed table whose ACLs, audit logs, and column lineage apply consistently across all attached Databricks workspaces. |
|
| 11 | What are Databricks System Tables (`system.*`), and how do `system.billing.usage`, `system.access.audit`, and `system.access.table_lineage` support enterprise governance? | System Tables in the `system` catalog expose SQL-queryable account logs for DBU billing (`billing.usage`), security audits (`access.audit`), and lineage (`access.table_lineage`). | A FinOps engineer joins `system.billing.usage` with `system.billing.list_prices` to calculate daily dollar spend per custom job tag across all workspaces. |
|
| 12 | What is Lakehouse Federation in Databricks Unity Catalog? | Lakehouse Federation uses Foreign Connections and Foreign Catalogs in Unity Catalog to query external databases (Snowflake, Postgres, MySQL, BigQuery) in place with pushdown. | After creating a `CONNECTION` to an operational PostgreSQL RDS instance and mounting a `FOREIGN CATALOG`, analysts join live Postgres `orders` with Delta Lake `clickstreams` in a single SQL query under Unity Catalog permissions. |
|
| 13 | How does Adaptive Query Execution (AQE) in Spark 3+ on Databricks optimize joins, partitions, and data skew at runtime? | AQE uses runtime shuffle statistics to coalesce small partitions, convert Sort-Merge Joins into Broadcast Hash Joins, and split skewed partitions. | When a 500 GB table is filtered down to 8 MB at runtime before joining a 2 TB fact table, AQE dynamically converts the Sort-Merge Join into a fast Broadcast Hash Join. |
|
| 14 | How do Databricks Asset Bundles (DABs — `databricks.yml`) standardize CI/CD for Lakehouse jobs, DLT pipelines, and ML models? | Databricks Asset Bundles define jobs, DLT pipelines, and models as code in `databricks.yml`, deployed across environments via `databricks bundle validate/deploy/run`. | During a GitHub Actions release, running `databricks bundle deploy -t prod` deploys the parameterized DLT pipeline and Multi-Task Workflow using a production Service Principal identity. |
|
| 15 | How does Databricks Auto Loader (`cloudFiles`) ingest files from cloud storage more efficiently than standard `spark.readStream` file sources? | Auto Loader uses `.format('cloudFiles')` to discover new files incrementally via cloud notifications or optimized directory listing, tracking state in RocksDB checkpoints. | When ingesting millions of hourly JSON files from S3, Auto Loader avoids expensive full S3 `LIST` scans and automatically persists inferred schemas to `cloudFiles.schemaLocation`. |
|
| 16 | What SQL syntax queries historical snapshots or restores a table in Delta Lake Time Travel? | Query historical states using `VERSION AS OF n` or `TIMESTAMP AS OF 'ts'`, and roll back via `RESTORE TABLE table TO VERSION AS OF n`. | After an accidental `DELETE` at commit version 42, an engineer runs `RESTORE TABLE main.sales.orders TO VERSION AS OF 41` to atomically revert the table state. |
|
| 17 | How does `APPLY CHANGES INTO` in Delta Live Tables (DLT) handle out-of-order Change Data Capture (CDC) events for SCD Type 1 and SCD Type 2? | `APPLY CHANGES INTO` orders CDC events by `SEQUENCE BY` and updates target tables in place (`SCD TYPE 1`) or tracks history (`SCD TYPE 2`). | When a customer address update with `updated_at = 10:05` arrives before an older update from `10:01`, `SEQUENCE BY updated_at STORED AS SCD TYPE 2` orders both revisions accurately without manual `MERGE` logic. |
|
| 18 | What are the four deployment patterns in Databricks Mosaic AI Model Serving? | Foundation Model APIs (open LLMs), External Models (governed proxy to OpenAI/Anthropic/Bedrock), Custom Models (MLflow/PyFunc), and Mosaic AI Agent Framework endpoints. | An enterprise routes all OpenAI GPT-4o and Anthropic Claude calls through a Mosaic AI External Model endpoint so API keys stay hidden in Unity Catalog and prompts are logged to Inference Tables. |
|
| 19 | In Databricks Mosaic AI Vector Search (tested on the Generative AI Engineer exam), how do Delta Sync Indexes (Managed vs. Self-Managed Embeddings) and Direct Vector Access Indexes differ? | Delta Sync Indexes automatically sync from a Delta table via Change Data Feed (managed or self-managed embeddings); Direct Vector Access uses REST/SDK upserts. | When a new chunk is appended to `main.rag.doc_chunks` (with `delta.enableChangeDataFeed = true`), a Delta Sync Index with Managed Embeddings automatically embeds the text using `databricks-gte-large-en` and updates the vector index. |
|
| 20 | What are Unity Catalog Volumes (`catalog.schema.volume`), and when should you use them instead of DBFS (`dbfs:/`)? | Volumes govern unstructured or semi-structured files (PDFs, CSVs, images, ML artifacts) at `/Volumes/<catalog>/<schema>/<volume>/`, replacing legacy DBFS root mounts. | In a GenAI RAG pipeline, raw PDF manuals are uploaded to `/Volumes/main/rag/raw_pdfs/` with `READ VOLUME` permissions granted to the ingestion service principal. |
|
| 21 | What is Delta UniForm (Universal Format) in Databricks? | Delta UniForm automatically generates Apache Iceberg and Hudi metadata alongside `_delta_log` over one shared copy of Parquet files for cross-engine reads. | Enabling `'delta.universalFormat.enabledFormats' = 'iceberg'` on a Unity Catalog Managed Delta table lets external Trino or BigQuery Iceberg readers query the exact same Parquet files in place. |
|
| 22 | In Spark Structured Streaming on Databricks, how do `Trigger(availableNow=True)` and Watermarking (`withWatermark`) work? | `availableNow=True` processes all backlog data across micro-batches then stops; `withWatermark` bounds state memory by dropping late records older than the threshold. | Combining `.withWatermark('event_time', '2 hours').dropDuplicates(['event_id', 'event_time'])` with `.trigger(availableNow=True)` runs an incremental hourly deduplication job that shuts down its cluster when finished. |
|
| 23 | How do Shallow Clones and Deep Clones (`CREATE TABLE ... CLONE`) differ in Delta Lake? | `SHALLOW CLONE` copies only `_delta_log` metadata referencing source Parquet files; `DEEP CLONE` copies both metadata and physical Parquet files to an independent path. | Before testing a complex `MERGE INTO` script, a data engineer runs `CREATE TABLE dev.sales.orders SHALLOW CLONE prod.sales.orders` in 2 seconds without duplicating 10 TB of Parquet files. |
|
| 24 | How does Delta Lake achieve ACID transactions, schema enforcement, and optimistic concurrency control on cloud object storage? | Delta Lake combines immutable Parquet data files with an ordered, atomic `_delta_log` directory of JSON commits and checkpoints as the single source of truth. | When two Spark jobs write to a Delta table simultaneously, the `_delta_log` uses optimistic concurrency control to serialize commits or throw a `ConcurrentAppendException` if conflicting files were modified. |
|
| 25 | How does Delta Lake Data Skipping work under the hood when evaluating a `WHERE` filter? | Delta Lake stores per-file column statistics (min, max, null counts) for the first 32 columns in `_delta_log` to skip irrelevant Parquet files. | When a query filters `WHERE order_date = '2026-11-11'`, the Photon engine inspects `_delta_log` file statistics and skips 98% of Parquet files without opening them. |
|
| 26 | In the Databricks Mosaic AI Agent Framework and Agent Evaluation, how are Tool-Calling Agents built and evaluated? | Register tools as Unity Catalog Functions (`CREATE FUNCTION`), trace calls with MLflow Tracing, and evaluate RAG/agent outputs using LLM-as-a-Judge metrics (`mlflow.evaluate`). | By registering `main.crm.lookup_customer_tier(id STRING)` as a Unity Catalog SQL function, any authorized Mosaic AI agent can discover and invoke it as a governed tool with automatic lineage tracking. |
|
| 27 | In Unity Catalog, how do Storage Credentials, External Locations, Managed Tables, and External Tables interact? | External Locations bind cloud URIs to Storage Credentials; dropping a Managed Table deletes metadata and data files, whereas dropping an External Table keeps files. | When an analyst runs `DROP TABLE prod.sales.managed_orders`, Unity Catalog removes the table from the schema and cleans up underlying cloud files; dropping an External Table leaves S3 Parquet files untouched. |
|
| 28 | What does the Delta Lake `VACUUM` command do, what is its default retention threshold, and what happens to Time Travel after running it? | `VACUUM` deletes unreferenced Parquet files older than the retention threshold (default 7 days / 168 hours), disabling Time Travel past that window. | Running `VACUUM events RETAIN 0 HOURS` requires disabling `spark.databricks.delta.retentionDurationCheck.enabled` and can corrupt active concurrent readers or writers. |
|
| 29 | What are the responsibilities of the Bronze, Silver, and Gold layers in the Databricks Medallion Lakehouse Architecture? | Bronze stores raw append-only source payloads; Silver cleanses, deduplicates, and conforms entities; Gold provides aggregated star-schema or KPI tables for BI and ML. | Raw Kafka JSON clickstreams land in `bronze_clicks` via Auto Loader, are deduplicated and joined with users in `silver_sessions`, and roll up into `gold_daily_revenue`. |
|
| 30 | How do you register, govern, and deploy a GenAI / ML model using MLflow 3 and Unity Catalog (`mlflow.set_registry_uri('databricks-uc')`)? | Set registry URI to `'databricks-uc'`, log the model with a `ModelSignature`, register as `catalog.schema.model`, and manage deployments using Aliases like `@champion`. | In Unity Catalog Model Registry, legacy stages (`Staging`/`Production`) are replaced by flexible Model Aliases like `@champion`, allowing zero-downtime endpoint updates when `@champion` is reassigned to version 4. |
|
| 31 | What is the Databricks Photon Engine, and what workloads benefit most from enabling it? | Photon is a native C++ vectorized query engine accelerating SQL and DataFrame scans, joins, aggregations, and Delta writes (excluding custom Python UDFs). | Replacing a Python `@udf` with built-in Spark SQL functions on a Photon-enabled SQL Warehouse or Job Cluster yields a 4× speedup because Photon executes natively in C++ without JVM-to-Python serialization. |
|
| 32 | What are Deletion Vectors (`delta.enableDeletionVectors = true`) in Delta Lake, and how do they accelerate `DELETE`, `UPDATE`, and `MERGE` operations? | Deletion Vectors record soft-deleted row indices in compact roaring bitmaps (Merge-on-Read) instead of rewriting entire Parquet files during `DELETE`, `UPDATE`, or `MERGE`. | When a GDPR job deletes 50 customer rows scattered across 50 different 1 GB Parquet files, Deletion Vectors complete in seconds by writing tiny bitmap files rather than rewriting 50 GB of Parquet. |
|