DP-750 · 2.2.4 · Secure and govern Unity Catalog objects
Data retention
Apply data retention policies
Balance recovery and time-travel needs against storage cleanup, then apply retention settings deliberately.
See the retention lifecycle
- 1Current tableReferences active files
- 2Table historyOlder versions reference older files
- 3Retention thresholdProtects recent history
- 4VACUUMDeletes eligible unreferenced files
Retention balances recoverability and time travel against storage cleanup.
VACUUM is selective
- Still referenced by current tableKeep it
- Unreferenced but newer than retentionKeep it
- Unreferenced and older than retentionVACUUM can remove it
VACUUM does not delete every old file. It removes unreferenced files that are old enough.
Preview before deletion
Use a dry run to inspect eligible files when validating a maintenance policy. Very short retention can break time travel or long-running readers.
Key points
- Retention: Keeps old data files available for historical versions
- VACUUM: Removes files older than the retention threshold
- DRY RUN: Previews files eligible for deletion
- Safety: Short retention can break long-running readers or time travel
Exam trap
VACUUM does not delete current table data; it removes unreferenced files old enough for cleanup.
Sources · 1 Microsoft Learn page Show ▾
Checked on October 4, 2026. Report a problem
Go deeper on Microsoft Learn
Checked against Microsoft Learn on October 4, 2026. Report a problem with this card