ALTER TABLE UNSET TBLPROPERTIES

Removes one or more table properties from an existing Delta table.

Category: ddl

Syntax

ALTER TABLE <table> UNSET TBLPROPERTIES ('<key>', ...)

Description

## 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.

Parameters

NameTypeDescription
tableFully qualified table name or registered table name. The table must be registered in the current session.
propertiesProperty keys to remove.

Examples

-- 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');

Pitfalls

See Also

Open in interactive docs →   DeltaForge home →