Removes one or more table properties from an existing Delta table.
ALTER TABLE <table> UNSET TBLPROPERTIES ('<key>', ...)
## Overview Removes one or more table properties from a Delta table's metadata. This is the inverse of SET TBLPROPERTIES and is used to disable features or remove custom metadata. ## Behavior - Each specified property key is removed from the table's metadata. - If a specified key does not exist in the table's current properties, the operation silently ignores it. - The changes are persisted as a single metadata-only commit to the Delta log. - Multiple properties can be unset in one statement. ## Compatibility UNSET TBLPROPERTIES is a standard Delta Lake operation. The resulting metadata commit is compatible with all Delta readers.
| Name | Type | Description |
|---|---|---|
table | Fully qualified table name or registered table name. The table must be registered in the current session. | |
properties | Property keys to remove. |
-- Remove a single property
ALTER TABLE warehouse.sales.users UNSET TBLPROPERTIES ('delta.autoOptimize.optimizeWrite');
-- Remove multiple properties at once
ALTER TABLE warehouse.sales.events UNSET TBLPROPERTIES (
'delta.autoOptimize.optimizeWrite',
'delta.autoOptimize.autoCompact'
);
-- Remove a custom property
ALTER TABLE warehouse.sales.orders UNSET TBLPROPERTIES ('app.last_migration_version');