Skip to main content

FUSE_TAG

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

Returns the snapshot tags of a table. For more information about snapshot tags, see Snapshot Tags.

Syntax

FUSE_TAG('<database_name>', '<table_name>')

Output Columns

ColumnTypeDescription
nameSTRINGTag name
snapshot_locationSTRINGSnapshot file the tag points to
expire_atTIMESTAMP (nullable)Expiration timestamp; set when RETAIN is used in CREATE SNAPSHOT TAG

Examples

SET enable_experimental_table_ref = 1;

CREATE TABLE mytable(a INT, b INT);

INSERT INTO mytable VALUES(1, 1),(2, 2);

-- Create a snapshot tag
ALTER TABLE mytable CREATE TAG v1;

INSERT INTO mytable VALUES(3, 3);

-- Create another tag with expiration
ALTER TABLE mytable CREATE TAG temp RETAIN 2 DAYS;

SELECT * FROM FUSE_TAG('default', 'mytable');

---
| name | snapshot_location | expire_at |
|------|------------------------------------------------------------|----------------------------|
| v1 | 1/319/_ss/a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4_v4.mpk | NULL |
| temp | 1/319/_ss/f6e5d4c3b2a1f6e5d4c3b2a1f6e5d4c3_v4.mpk | 2025-06-15 10:30:00.000000 |
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