Skip to main content

DROP SNAPSHOT TAG

Introduced or updated: v1.2.891
ENTERPRISE EDITION FEATURE
TABLE VERSIONING is an Enterprise Edition feature. Contact Databend Support for a license.

Drops a named snapshot tag from a FUSE table. Once dropped, the referenced snapshot becomes eligible for garbage collection if no other tags or retention policies protect it.

note
  • This is an experimental feature. Enable it first: SET enable_experimental_table_ref = 1;
  • Only supported on FUSE engine tables.

Syntax

ALTER TABLE [<database_name>.]<table_name> DROP TAG <tag_name>

Parameters

ParameterDescription
tag_nameThe name of the snapshot tag to drop. An error is returned if the tag does not exist.

Examples

SET enable_experimental_table_ref = 1;

CREATE TABLE t1(a INT, b STRING);
INSERT INTO t1 VALUES (1, 'a'), (2, 'b');

-- Create and then drop a tag
ALTER TABLE t1 CREATE TAG v1_0;
ALTER TABLE t1 DROP TAG v1_0;

-- Querying a dropped tag returns an error
SELECT * FROM t1 AT (TAG => v1_0);
-- Error: tag 'v1_0' not found
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today