DROP SCHEMA HISTORY

Removes schema evolution tracking data for a specific table.

Category: catalogDeltaForge extension

Syntax

DROP SCHEMA HISTORY FOR TABLE <table>

Description

## Overview Removes all schema evolution tracking data for a specific table from the control plane catalog. This includes schema versions, file-to-version mappings, and schema change records. Schema history tracks how a table's column structure has changed over time. Dropping it resets this tracking, which is useful when the history has become stale, corrupted, or when you want to start fresh after significant schema changes. ## Behavior - Deletes all schema version records associated with the specified table. - Deletes all file-to-schema-version mappings for the table. - Deletes all schema change records (column additions, removals, type changes) for the table. - Returns the count of removed schema version records. - The command is routed through the control plane catalog API. A valid catalog router connection is required. - This operation does not affect the table itself, its data files, its current column metadata, or its catalog registration. ## Compatibility DROP SCHEMA HISTORY is a DeltaForge extension for managing schema evolution metadata. There is no ANSI SQL equivalent.

Examples

-- Drop all schema history for a table
DROP SCHEMA HISTORY FOR TABLE external.csv.sales;
-- Drop schema history without the optional TABLE keyword
DROP SCHEMA HISTORY FOR bronze.landing.events;
-- Reset schema tracking: drop history, drop columns, then re-detect
DROP SCHEMA HISTORY FOR TABLE silver.curated.orders;
DROP SCHEMA COLUMNS FOR TABLE silver.curated.orders;
DETECT SCHEMA FOR TABLE silver.curated.orders;

Pitfalls

See Also

Open in interactive docs →   DeltaForge home →