Skip to content

Applying retention rules to data

Data retention in Unity Catalog is managed at the Delta table level through table properties that control how long deleted files and transaction log history are kept, enabling Time Travel while balancing storage costs. Data engineers must understand the interaction between VACUUM, retention properties, and Unity Catalog governance to safely purge or preserve historical data.

1 · Learn the must-know

  • The Delta table property delta.deletedFileRetentionDuration (default 7 days) controls how long tombstoned data files are retained for Time Travel queries before VACUUM can remove them.
  • The Delta table property delta.logRetentionDuration (default 30 days) controls how long transaction log JSON/checkpoint files are kept, limiting how far back Time Travel can go.
  • Running VACUUM with a retention period shorter than the default 7 days requires disabling the safety check via spark.databricks.delta.retentionDurationCheck.enabled = false, and is discouraged because it can break concurrent readers or Time Travel queries.
  • VACUUM only removes files no longer referenced by the current table version plus files older than the retention threshold; it does not delete data still needed by active transactions.
  • Table properties for retention are set or altered using ALTER TABLE ... SET TBLPROPERTIES and apply per-table, so governance/retention policies must be applied consistently across managed and external Unity Catalog tables.
  • Unity Catalog audit logs and system tables (e.g., system.access.audit) have their own retention behavior separate from Delta table data retention, and are used for compliance/governance tracking rather than data recovery.

2 · Check your understanding

Check this objectiveFree · always available

A data engineer is troubleshooting a Delta table that has accumulated many stale data files from frequent streaming writes. To immediately reclaim storage, the engineer runs VACUUM on the table with a retention interval of 0 hours and no other configuration changes. What is the most likely outcome?

Your objective map0 tried · 0 answered correctly · 77 untouched

What you have tried across DP-750's objectives, not a readiness score.

Set up and configure an Azure Databricks environment15-20% of the exam0 of 13 tried
Secure and govern Unity Catalog objects15-20% of the exam0 of 12 tried
Prepare and process data30-35% of the exam0 of 28 tried
Deploy and maintain data pipelines and workloads30-35% of the exam0 of 24 tried

3 · Keep going