Tagging feature

Tags identify snapshots you need for auditing and conforming to GDPR. You can tag a snapshot to help you track retention for a certain period of time.

Iceberg tagging is available as a technical preview in Hive only. Cloudera recommends that you use this feature in test and development environments. It is not recommended for production deployments. Iceberg tagging is not available in Impala or Spark.

Create a tag

You can create a tag based on SYSTEM_VERSION, SYSTEM_TIME, or the current branch. Tables must be Iceberg V2 tables.

ALTER TABLE <table name> CREATE TAG <tag name> FOR SYSTEM_VERSION AS OF <snapshot ID>

ALTER TABLE <table name> CREATE TAG <tag name> FOR SYSTEM_TIME AS OF '<timestamp>'

ALTER TABLE <table name> CREATE TAG <tag name>

Query a tag

You can run SQL read queries on tags using the name of the tag as follows:

<database name>.<table name>.tag_<tag name>

For example:

SELECT * from mydb.mytable.tag_mytag;

Delete a tag

Use the following syntax to delete a tag.

ALTER TABLE <table name> DROP tag [IF EXISTS] <tag name>