Databricks Data Engineer Professional · Free practice question 3 of 12
VACUUM retention duration safety check
To reclaim storage quickly, an engineer at Thurlby Media runs VACUUM media.silver.views RETAIN 24 HOURS, and the command fails with a safety check error. What does this indicate?
- A.Retention below the 7-day default is blocked by a safety check, because removing recent files can break concurrent readers, writers and streams; it can be overridden only by disabling spark.databricks.delta.retentionDurationCheck.enabled
- B.VACUUM cannot be run on tables with liquid clustering
- C.The RETAIN clause accepts only days, not hours
- D.VACUUM requires the table to have no active streaming readers
Show answer and explanation
Correct answer: A. Retention below the 7-day default is blocked by a safety check, because removing recent files can break concurrent readers, writers and streams; it can be overridden only by disabling spark.databricks.delta.retentionDurationCheck.enabled
Why: Delta refuses VACUUM retention intervals shorter than the default 168 hours unless the retentionDurationCheck safety setting is turned off, because long-running queries and streams may still need files that are no longer current. Disabling the check should be done only when no operation can depend on older files. RETAIN takes a number of hours, and VACUUM works on clustered tables.
More free Databricks Data Engineer Professional questions
- Databricks SQL alerts with notifications
- Partitioning guidance for mid-size tables
- SQL warehouse sizing versus scaling
- BROWSE privilege for data discovery
- UNDROP TABLE for managed tables
- Workspace-catalog binding isolation
- Bundle generate and deployment bind
- Driver memory and toPandas
- Continuous job trigger for streaming
- Table update triggers for jobs
- Serverless environment dependencies