UNREGISTER TABLE

Removes a table's catalog entry without deleting the underlying data files.

Category: catalogDeltaForge extension

Syntax

UNREGISTER TABLE [IF EXISTS] <zone.schema.table>

Description

## Overview Removes a table's registration from the control plane catalog. The underlying data files at the table's storage location are not deleted, moved, or modified. Only the catalog metadata is removed. After unregistration, the table is no longer queryable by its three-part name. The data remains at its storage location and can be re-registered later with REGISTER TABLE. ## Behavior - If the table exists in the catalog, it is removed and the command returns a success message. - If IF EXISTS is specified and the table is not found, the command completes successfully without error. - If IF EXISTS is omitted and the table is not found, the command returns a TableNotFound error. - The command is routed through the control plane catalog API. A valid catalog router connection is required. - Column metadata and tag assignments associated with the table are not automatically cleaned up. Use DROP SCHEMA COLUMNS and UNSET TAG if cleanup is needed. - Other compute nodes will stop seeing the table after their next catalog synchronization. ## Compatibility UNREGISTER TABLE is a DeltaForge extension. It provides a non-destructive way to remove a table from the catalog namespace while preserving the underlying data.

Examples

-- Unregister a table from the catalog
UNREGISTER TABLE bronze.raw.events;
-- Unregister only if the table exists
UNREGISTER TABLE IF EXISTS bronze.raw.deprecated_logs;
-- Unregister and re-register a table at a new relative path under the zone
UNREGISTER TABLE silver.curated.customers;
REGISTER DELTA TABLE silver.curated.customers LOCATION 'customers_v2';
-- Clean up multiple decommissioned tables
UNREGISTER TABLE IF EXISTS gold.analytics.old_metrics;
UNREGISTER TABLE IF EXISTS gold.analytics.legacy_report;
DROP SCHEMA COLUMNS ORPHANS;

Pitfalls

See Also

Open in interactive docs →   DeltaForge home →