Skip to main content

VACUUM CATALOG

The VACUUM CATALOG command removes expired snapshots and orphaned metadata files for all Iceberg tables in the specified Arctic catalog.

For Arctic catalog sources, catalog owners and members of the ADMIN role may manually run the VACUUM CATALOG command in the SQL API or the SQL Runner to start a vacuum job on demand.

note

For Arctic catalogs, Dremio automatically runs the VACUUM CATALOG command if you enable table cleanup and set a cutoff policy in the Dremio console.

Before you can manually run the VACUUM CATALOG command, you must complete the following tasks:

  1. Add the compute resources and data access credentials that are required to automate routine maintenance operations, including table cleanup, for the Arctic catalog. The data access credentials must permit read and write access on all tables and folders that the catalog contains.
  2. Enable table cleanup and set the number of days to use as the cutoff policy for the catalog, either in the Dremio console or with the Vacuum API.
  3. Add the Arctic catalog as a source in Sonar.
Syntax
VACUUM CATALOG <catalog_source_name>;

Parameters

<catalog_source_name> String

The name of the Arctic catalog source to vacuum.

Example

Vacuum a catalog
VACUUM CATALOG myCatalog;