About this exam
Databricks Certified Data Engineer Professional is Databricks' advanced certification for data engineers, covering the design, build and operation of production-grade data pipelines on Databricks. It covers Delta Lake internals and optimization, Structured Streaming, data modeling, security and governance, monitoring and deploying jobs, and using the CLI and REST API.
Try a sample question
This is an original sample question written by itmoshi based on the exam objectives.
The Delta table main.sales.orders is updated hourly with MERGE. A daily job will run VACUUM main.sales.orders with no RETAIN clause, and the command must not be changed. For auditing, the team wants this VACUUM to keep the data files that table versions from the last 30 days reference, instead of the default 7 days. The table's delta.logRetentionDuration is already set to 30 days or longer. Which table setting raises the default VACUUM file retention to 30 days?
- AALTER TABLE main.sales.orders SET TBLPROPERTIES ('delta.logRetentionDuration' = 'interval 30 days')
- BSET spark.databricks.delta.retentionDurationCheck.enabled = false
- CALTER TABLE main.sales.orders SET TBLPROPERTIES ('delta.enableChangeDataFeed' = 'true')
- DALTER TABLE main.sales.orders SET TBLPROPERTIES ('delta.deletedFileRetentionDuration' = 'interval 30 days')
Show answer and explanation
Answer:D VACUUM without RETAIN keeps files for delta.deletedFileRetentionDuration, so set that to 30 days.
Why it is correct
VACUUM without RETAIN deletes data files that were logically removed more than delta.deletedFileRetentionDuration ago (7 days by default). Setting this table property to 30 days raises the threshold that subsequent VACUUM runs use, without touching the command. It only changes the cutoff for future cleanup; files that an earlier VACUUM already deleted cannot be restored. Note that reading an old version with time travel also requires enough transaction log history to reconstruct that version, in addition to its data files, and log retention is governed by delta.logRetentionDuration. Databricks Runtime 18.0 and later require logRetentionDuration to be at least deletedFileRetentionDuration; because this table's log retention is already 30 days or longer, setting D alone meets the requirement.
The other options
- ✗ A Log retention is 30 days by default unless it has been changed. Extending only the log does not help: VACUUM still deletes data files past the file retention threshold (7 days by default), so old versions can become unreadable. Use it to adjust how long the transaction log is kept, separately from data file retention.
- ✗ B Setting it to false only disables the safety check that blocks VACUUM with a RETAIN shorter than the configured retention threshold; it does not keep files any longer. Disabling it by mistake makes it easier to delete files you still need.
- ✗ C Change Data Feed records row-level changes for downstream consumers; it does not stop VACUUM from deleting data files. Use it to propagate only the changes to downstream tables.
Key takeaway
VACUUM file deletion → deletedFileRetentionDuration (default 7 days); transaction log cleanup → logRetentionDuration (default 30 days). Time travel needs both the data files and the log. retentionDurationCheck only guards against shortening retention, and changing settings never restores files already deleted.
Try 26 questions like this for free
itmoshi is an unofficial study service and is not affiliated with Databricks or any exam provider.