Snowflake — Tag

Shahrukh
3 min readMay 3, 2023

--

Tag

As the name suggests, a tag is nothing but a label for the purpose of identification. A data steward can use it to identify data attributes in the database for tracking, compliance, and discovery purposes. In Snowflake, these can be used for tracking resource’s usage as well.

A Snowflake Tag can be defined as below and have multiple properties mentioned below.

An Example to understand better for defining tags,

From the example we can infer,

1. Single tag can be assigned to multiple tables (same for all schema objects)

2. One tag may have multiple string values assigned to it.

Tag Quotas

There is a limit on the number of tags that can be defined at an object level, which is 50 unique tags. Additionally, 50 unique tags (Combined) can further be defined on columns in a table itself. If 10 tags are defined on a column, then you are left with 40 more to be defined on other columns in that table.

Tag Lineage

As the name suggests, tags flow from the parent to the child objects. Tags can be overridden in the child objects for specificity purposes. Overriding a Tag means the value of the tag can be updated not the Tag itself.

To understand, let’s dive into this example,

A Visualization of how tag lineage would like is as below,

Also, now there can be additional tags at different levels, how will it affect the hierarchy? It won’t have any effect. Only an additional tag will be inherited.

Benefits

Tags in Snowflake can have multiple benefits to take advantage of.

Tags and Snowflake Actions

Tags behave a little differently when different actions are taken with respect to the Snowflake abilities.

Tracking Tags

The purpose of tags is to ultimately to reap the benefits mentioned above, but how can we do that. Two ways,

The concludes the Tag lifecycle from creation to tracking. For technical implementation we can always read the extensive documentation from Snowflake.

Note: This is the Eighth one in a series of articles. Click here for the previous one.

--

--

Shahrukh
Shahrukh

Written by Shahrukh

SnowPro Certified - A Business Intelligence enthusiast. A decade-long career in web development and data analysis.

No responses yet