Data Engineer Professional · 20% of the exam

Data Modeling: free practice questions

5 sample questions from our 50-question bank for this domain — answers and explanations included. These are the same scenario-based style as the real Databricks exam.

1. A data engineering team partitions a Delta table by `year` and `month` for a dataset that spans 5 years of financial records. A common query pattern filters on both `month` and a non-partitioned column `account_category` (200 distinct values). The team considers adding Z-ORDER on `account_category`. After running `OPTIMIZE ... ZORDER BY (account_category)`, what behavior should the engineer expect?

  • A. Z-ORDER clustering is applied globally across all partitions, reorganizing files across year/month boundaries to minimize the total number of files.
  • B. Z-ORDER clustering is applied independently within each partition, co-locating rows with the same account_category values within the files of each year/month partition, enabling file skipping within a partition.✓ Correct
  • C. Z-ORDER on account_category automatically adds it as a secondary partition column, creating nested partitions like year=2024/month=01/account_category=SAVINGS.
  • D. Z-ORDER has no effect when partition columns are already defined, because partition pruning handles all filtering and Z-ORDER only works on non-partitioned tables.
Explanation

In Delta Lake, Z-ORDER operates within partition boundaries — it does not reorganize data across partitions. When a table is partitioned by year and month, running OPTIMIZE ZORDER BY (account_category) clusters files within each individual partition by account_category values. This allows the engine to skip files within a partition that don't contain the queried account_category values. Option A is incorrect — Z-ORDER never moves data across partition boundaries; partitioning and Z-ORDER are complementary, not conflicting. Option C is incorrect — Z-ORDER does not create nested partition directories; it is purely a file-level clustering mechanism within existing partitions. Option D is incorrect — Z-ORDER and partitioning work together effectively; partitioning handles coarse-grained filtering (year/month) while Z-ORDER handles fine-grained filtering (account_category) within each partition.

2. In Unity Catalog, a data engineer needs to create a view that always reflects the latest state of an underlying Delta table and can be queried like a table but does NOT require a scheduled refresh job. The view also needs to support incremental updates for streaming consumers. Which Unity Catalog object type BEST satisfies these requirements?

  • A. A standard SQL VIEW, because it always reads from the latest snapshot of the underlying table at query time with no refresh needed.
  • B. A MATERIALIZED VIEW, because it pre-computes and caches query results and supports streaming incremental updates natively.
  • C. A STREAMING TABLE, because it is designed to ingest and process streaming data incrementally and exposes results as a queryable table.
  • D. A standard SQL VIEW for the real-time query requirement, and a separate STREAMING TABLE for the streaming consumer requirement — no single object type satisfies both.✓ Correct
Explanation

Option D is correct. No single Unity Catalog object type simultaneously satisfies all three requirements. A standard SQL VIEW always reflects the latest table state without a refresh job, but it does NOT natively support incremental streaming updates — it is re-executed at query time. A STREAMING TABLE supports incremental updates for streaming consumers but requires continuous or triggered pipeline updates (it is not a simple passthrough view). A MATERIALIZED VIEW pre-computes results and must be refreshed; it does not always reflect the latest state in real time without a refresh mechanism. The requirements as stated — real-time latest state, no refresh job, AND streaming incremental support — span two different object types. Option A is partially correct (views are always fresh) but misses the streaming consumer requirement. Option B is wrong — Materialized Views require explicit refresh and do not inherently support streaming incremental updates. Option C is wrong — Streaming Tables are for streaming ingestion pipelines, not ad-hoc queries that always reflect the latest state without a pipeline.

3. A Delta Live Tables pipeline must enforce that the `order_amount` column is always positive. Records that violate this rule should be quarantined to a separate table rather than silently dropped or causing the pipeline to fail. Which DLT expectation construct achieves this requirement?

  • A. CONSTRAINT valid_amount EXPECT (order_amount > 0) ON VIOLATION DROP ROW
  • B. CONSTRAINT valid_amount EXPECT (order_amount > 0) ON VIOLATION FAIL UPDATE
  • C. CONSTRAINT valid_amount EXPECT (order_amount > 0) — with no ON VIOLATION clause, combined with a second table that SELECTs rows where order_amount <= 0 from the raw source.✓ Correct
  • D. CONSTRAINT valid_amount EXPECT (order_amount > 0) ON VIOLATION QUARANTINE ROW
Explanation

Option C is correct. DLT does not have a native QUARANTINE action. The standard pattern to quarantine invalid rows is to omit the ON VIOLATION clause (which defaults to keeping the row and recording the violation as a metric) on the primary table, then define a second DLT table that selects only the rows failing the expectation from the upstream source. This keeps violating rows accessible without silently discarding or halting the pipeline. Option A (DROP ROW) discards invalid records — they are not quarantined for analysis. Option B (FAIL UPDATE) halts the entire pipeline update on any violation. Option D is a distractor — QUARANTINE ROW is not a valid DLT ON VIOLATION action; valid options are DROP ROW and FAIL UPDATE (or omitting the clause).

4. A data architect is designing a Gold layer data model on Databricks for a large retail company. The Gold layer must serve three distinct consumer workloads: (1) a real-time dashboard that queries the last 7 days of sales by store and SKU, (2) a monthly finance report aggregating sales by region and product category over rolling 12 months, and (3) an ML feature store consuming individual transaction records for the past 90 days. The Silver layer contains a single `transactions` table (8 TB, partitioned by `sale_date`). Which Gold layer design strategy BEST balances performance, cost, and maintainability for all three consumers?

  • A. Create a single Gold table that is a full copy of the Silver `transactions` table, applying Z-ORDER BY (`store_id`, `sku_id`, `region`, `category`, `transaction_id`) to serve all three workloads from one physical table.
  • B. Create three separate Gold tables—one per consumer workload—each materialized as a DLT Materialized View from Silver, scoped to only the columns and time ranges needed by each consumer, with appropriate clustering per workload.✓ Correct
  • C. Create a single Gold Delta table partitioned by both `sale_date` and `region`, and instruct all three consumer teams to apply their own `WHERE` clause filters, relying on partition pruning to isolate relevant data.
  • D. Promote the Silver `transactions` table directly to Gold by granting read permissions to all three consumer teams, and use Unity Catalog dynamic views to apply row-level filters per consumer.
  • E. Create a single Gold Materialized View that joins all required dimensions and pre-aggregates at the daily/store/SKU/region/category grain, then have all three consumers query this single view with their own GROUP BY clauses.
Explanation

Option B is correct. The three consumer workloads have fundamentally different access patterns, granularities, and time horizons: the dashboard needs recent, high-frequency store/SKU-level data; the finance report needs 12-month aggregations at region/category grain; and the ML feature store needs individual transaction records for 90 days. Creating separate, purpose-built Gold tables as DLT Materialized Views allows each to be scoped to the minimal columns and rows needed, clustered or partitioned for their specific query pattern, and refreshed independently—maximizing query performance and minimizing cost. Option A is wrong because duplicating the full 8 TB Silver table into Gold is extremely costly and inefficient; Z-ORDERing on 5 columns simultaneously dilutes clustering effectiveness (Z-ORDER works best on 1-3 high-cardinality columns), and a single table cannot be optimally organized for all three divergent access patterns. Option C is wrong because partitioning by two high-cardinality date and region columns creates a risk of over-partitioning and still forces all three workloads to scan a single large table—query performance will suffer for the finance report (12-month range) and ML workload (90-day individual records) because partition pruning alone cannot compensate for the lack of workload-specific clustering. Option D is wrong because the Silver layer should not be exposed directly to Gold consumers—this violates medallion architecture separation of concerns; Silver tables typically contain partially cleaned data and the unified consumption layer (Gold) should provide business-ready, semantically enriched datasets. Using dynamic views for access control is valid in Unity Catalog but does not address performance optimization for divergent workloads. Option E is wrong because a single pre-aggregated Gold Materialized View at the daily/store/SKU/region/category grain cannot serve the ML feature store, which needs individual transaction-level records—aggregated data cannot be disaggregated back to transaction rows, making this design fundamentally incompatible with one of the three consumer requirements.

5. A data architect is evaluating Delta Lake, Apache Iceberg, and Apache Hudi for a new lakehouse deployment on cloud object storage. The team has a strong requirement for row-level upserts with very high write throughput and near-real-time read freshness from streaming sources. Which statement BEST characterizes a key differentiator relevant to this requirement?

  • A. Only Delta Lake supports MERGE INTO syntax for upserts; Hudi and Iceberg require full table rewrites for any record update.
  • B. Apache Hudi was purpose-built for high-throughput upsert workloads using its MergeOnRead (MOR) table type, which appends delta logs and merges on read, providing a strong balance of write throughput and read freshness for streaming upsert use cases.✓ Correct
  • C. Apache Iceberg provides the best upsert throughput because its hidden partitioning feature eliminates the need to rewrite any data files during updates.
  • D. Delta Lake's OPTIMIZE and ZORDER commands are prerequisites for any upsert operation, making it slower than Hudi for streaming upsert workloads.
Explanation

Apache Hudi was originally designed at Uber specifically for high-throughput upsert/incremental pipelines. Its MergeOnRead (MOR) table type writes delta (log) files on upsert and merges them at read time, dramatically increasing write throughput at the cost of slightly more expensive reads — a well-known trade-off optimized for streaming upsert use cases. Option A is false — both Hudi (upsert API) and Iceberg (MERGE INTO with newer versions) support row-level updates; they do not require full table rewrites. Option C is misleading — Iceberg's hidden partitioning helps with partition management but does not inherently eliminate data file rewrites during updates; Copy-on-Write (CoW) in Iceberg still rewrites affected files. Option D is false — OPTIMIZE and ZORDER are post-write optimization commands in Delta Lake and are never prerequisites for MERGE INTO or other DML operations.

45 more questions in this domain

Practice the full bank with instant grading, flashcards, and a timed mock exam.

Start practicing free