Vacuum

Warning

There are two implementations of VACUUM: the Databricks Delta version and the Databricks DBIO version. The Databricks Delta version works only on Databricks Delta tables.

Vacuum with DBIO

VACUUM ([db_name.]table_name|path) [RETAIN num HOURS]

Recursively vacuums directories associated with the Spark table or Spark path, removing uncommitted files older than the number of specified hours. DBIO automatically triggers VACUUM operations as data is written. See Transactional Writes to Cloud Storage with DBIO for more information.

Vacuum a Databricks Delta table

See Garbage collection for more information.