Skip to content
David Liu edited this page Jul 27, 2025 · 5 revisions

VACUUM

This command works differently depending on working environment: Delta, Apache Spark, or Apache Iceberg table.

VACUUM removes all files from the table directory that are

  • not managed by Delta
  • outdated: data files that are no longer in the latest state of the transaction log for the table and are older than a retention threshold.
    • default retention threshold: 7 days
    • not based on modification timestamps on the storage system
    • you lose the ability to time travel back to a version older than the specified data retention period.

VACUUM skip all directories that

  • start with _, including _delta_log

Time travel

Docs: Azure Databricks

  • Similar to Query an older snapshot of a table

DROP FEATURE

ALTER TABLE <table-name> DROP FEATURE <feature-name> [TRUNCATE HISTORY]

is one of

  • typeWidening
  • columnMapping
  • deletionVectors
  • v2Checkpoint
  • checkConstraints
  • vacuumProtocolCheck

Clone this wiki locally