CertKeen

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?

  1. 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
  2. B.VACUUM cannot be run on tables with liquid clustering
  3. C.The RETAIN clause accepts only days, not hours
  4. 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