Practice exam · Databricks
Databricks Certified Data Engineer Professional practice exam
Short answer
The Databricks Certified Data Engineer Professional practice exam has 50 questions in 120 minutes, with a 70% passing mark, as configured here. The fastest way to know whether you are ready is to sit a full exam on the clock and read your score by domain, not only the total.
Domains covered
- Data Processing
- Data Modeling
- Deployment and Monitoring
- Performance Optimization
- Security and Governance
Sample questions, with explanations
Three questions from the bank, open to read.
A job processes ~120 GB of input with a wide transformation. The team has set spark.sql.shuffle.partitions to 8 on a cluster with 64 total executor cores, reasoning that fewer partitions means less overhead. The Spark UI shows only 8 shuffle tasks, each processing ~15 GB, with heavy disk spill and most cores sitting idle during the shuffle stage. AQE is disabled for this job. What change best improves throughput?
- Raise spark.sql.shuffle.partitions to a value near or above the total core count (e.g., 128) so partitions are smaller, spill is reduced, and all cores stay busy ✓ (correct)
- Lower spark.sql.shuffle.partitions further to 4 so there is even less shuffle coordination overhead
- Broadcast the 120 GB dataset so the shuffle is skipped entirely on all executors
- Increase executor memory so each of the 8 tasks can hold its 15 GB partition without spilling, keeping 8 partitions
Why this is correct
Raising shuffle partitions is correct: with only 8 partitions on 64 cores, at most 8 tasks run at once, leaving most cores idle, and each task's 15 GB exceeds memory and spills to disk. Increasing partitions to near or above core count yields smaller per-task data (less spill) and enough tasks to saturate all cores. 'Lower to 4' worsens both problems — fewer, larger tasks mean more spill and even more idle cores; the 'less overhead' reasoning is the misconception being tested. 'Broadcast the 120 GB dataset' is invalid: broadcasting is for small tables and a 120 GB broadcast would blow up executor memory; it also does not apply to a single wide transformation's shuffle. 'Increase executor memory to fit 15 GB partitions' may stop the spill but leaves 56 of 64 cores idle, so throughput stays poor — the under-parallelism, not just spill, is the core problem.
A customer table contains a national_id column. Analysts in the 'analytics' group must run aggregate queries over the table but must never see raw national IDs, while a small 'compliance' group must see them in the clear. The team wants a single physical table (no copies) and wants the masking enforced at query time regardless of which tool connects. Which Unity Catalog approach satisfies this?
- Grant SELECT on the table to analytics but REVOKE the national_id column; Unity Catalog will automatically null out revoked columns in returned rows.
- Attach a column mask UDF to national_id that returns the raw value when is_account_group_member('compliance') is true and a redacted value otherwise; the mask is enforced by Unity Catalog at query time for all clients. ✓ (correct)
- Create a view that hashes national_id and point analytics at the view; since the underlying table grant is what UC enforces, analysts querying the base table will also receive the hashed value.
- Create two separate tables — one with the real national_id for compliance and one with the column dropped for analytics — and grant each group access to only one table.
Why this is correct
Correct: UC column masks let you bind a UDF to a column that conditionally returns raw or redacted data based on the caller's group membership (via is_account_group_member or current_user), enforced centrally at query time across any client connecting through UC — exactly one physical table, dynamic per-group behavior. Creating two physical tables violates the 'single physical table, no copies' requirement and creates a synchronization/governance burden. The 'REVOKE column, UC nulls it out' option reflects a misconception: standard UC SELECT grants are at the table level and there is no automatic per-row column nulling from a column revoke — fine-grained masking requires column masks (or views). The view-hashing option is wrong because applying a transformation in a view does NOT change what the base table returns; anyone with access to the base table still sees raw values, so security-by-view only works if base-table access is removed and users are forced through the view.
A retail data team ingests a daily customer dimension feed of ~5 million rows into a silver Delta table. They must track the full history of changes to a customer's `loyalty_tier` and `region` so that historical fact-table joins reflect the attribute values that were valid at transaction time. Only the rows that actually changed should produce new history records, and existing current rows must be flagged out-of-date when superseded. Which approach correctly implements this requirement?
- Overwrite the entire dimension table each day with `INSERT OVERWRITE`, then rebuild history nightly by diffing two adjacent table versions with time travel, since this avoids the cost of MERGE on 5 million rows.
- Implement SCD Type 2 with a single MERGE that uses a staged set of changed-and-new keys: the WHEN MATCHED clause (filtered to rows where tracked columns differ) sets `is_current = false` and `end_date`, and a second INSERT pass writes the new versions with `is_current = true` and an open `end_date`. ✓ (correct)
- Use a single MERGE with WHEN MATCHED THEN UPDATE and WHEN NOT MATCHED THEN INSERT against the natural key, relying on the MERGE to automatically version rows because Delta tracks attribute changes as Type 2 history when `is_current` exists.
- Implement SCD Type 1 with a MERGE WHEN MATCHED THEN UPDATE that overwrites `loyalty_tier` and `region` in place, since Delta's transaction log retains every prior version and time travel can reconstruct the history for any join.
Why this is correct
The approach using a staged set of changed-and-new keys with a MERGE that closes out old rows (`is_current = false`, `end_date`) plus a separate INSERT of the new versions is the canonical SCD Type 2 pattern on Delta. A single MERGE cannot both close the old row AND insert a new row for the same natural key in one statement (one source row can match at most one action), so the two-pass / changed-key staging technique is required. The Type 1 with in-place overwrite option is wrong because SCD Type 1 by definition discards history; while Delta time travel retains old file versions, time travel is an operational/retention feature bounded by VACUUM and `logRetentionDuration`, not a queryable as-of-transaction-time dimension — you cannot reliably join a fact's transaction date to the correct historical attribute through time travel. The single-MERGE-on-natural-key option is wrong because MERGE does not automatically version rows; the mere presence of an `is_current` column does not make Delta produce Type 2 history — that logic must be explicitly written, and a plain UPDATE would overwrite the row, losing history. The full daily overwrite + diff-versions option is wrong because reconstructing history by diffing Delta versions is fragile (versions expire after VACUUM, multiple writes per day break the 1-version-per-day assumption) and `INSERT OVERWRITE` destroys the existing history rows entirely.
Take the full practice exam
- 50 questions drawn from the bank, with a 120-minute timer
- Score by domain and a review of every question
- An AI tutor to talk through each question you miss
- What you miss feeds your study plan
Independent, unofficial practice exam. Databricks and the exam name are trademarks of their owners; UpSkillScore is not affiliated with them. Format and passing mark are the exam's configuration in UpSkillScore, not an official statement.
Frequently asked questions
How many questions does the Databricks Certified Data Engineer Professional practice exam have?
It has 50 questions and a 120-minute limit. The passing mark of the practice exam is 70%.
Is this the official Databricks Certified Data Engineer Professional exam?
No. It is an independent practice exam built to match the structure of the real one. It does not replace the official exam.
Do I need an account to take it?
You can read the structure and sample questions without an account. Taking the full timed exam, scoring by domain and the AI tutor need one.