Vacuum

Vacuum a Spark table

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

Recursively vacuum directories associated with the Spark table and remove uncommitted files older than a retention threshold. The default threshold is 7 days. 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

VACUUM [db_name.]table_name|path [DRY RUN] [RETAIN num HOURS]

Recursively vacuum directories associated with the Databricks Delta table and remove files that are no longer in the transaction log and are older than a retention threshold. The default threshold is 7 days. See Garbage collection for more information.

DRY RUN
Return a list of files to be deleted.
RETAIN num HOURS
The retention threshold.