What you will be able to do
- Create tags with ALLOWED_VALUES and PROPAGATE, and set them on objects and columns
- Explain how a tag reaches an object: by being set, by inheritance, by propagation, by classification or by cloning
- Choose between the TAG_REFERENCES function, the TAG_REFERENCES view and TAG_REFERENCES_WITH_LINEAGE to audit tags
- Configure and monitor sensitive data classification, including its coverage and cost
- Protect classified columns automatically by assigning a masking policy to a tag
Key concept
Tag — A tag is a schema-level object that you attach to other objects and columns with a string value. It is stored as key-value metadata. Classification, masking and auditing all work by reading or setting these tags.
1.What a tag is and how it reaches an object
You can't protect data until you know where it is, and in Snowflake that knowledge is recorded in tags. A tag is a schema-level object. Each time you assign it to another object you also give it a string value, and Snowflake stores the tag and value as a key-value pair. So cost_center = 'sales' on a warehouse is metadata about the warehouse. It is not a column and not a comment. Once objects are tagged, you query the tags to monitor those objects and to support auditing and reporting.
One tag can label many objects. The same cost_center tag can be on a warehouse and a table at once. Its value can be sales everywhere or different on each object, for example engineering, marketing and finance. An object can also carry several tags, up to 50 on a single table or view.
A tag can end up on an object in five ways. When you audit, you often need to know which one it was:
- Someone set it with a
CREATE <object>orALTER <object>statement. - It was inherited from an object higher in the securable object hierarchy. A tag on a table is inherited by every column in that table, and a warehouse inherits tags set on the account.
- It propagated automatically from a source object. This happens when the target depends on the source (a view over a tagged table) or when data moves into the target (a table created with CTAS).
- Sensitive data classification set it on a column it judged to be sensitive.
- The table was created from a tagged table with
CREATE TABLE … LIKEorCREATE TABLE … CLONE.
Checkpoint 1 of 8· Check yourself
A data steward finds that a view now carries the tag data_sensitivity = 'high'. Nobody ran a CREATE or ALTER statement to set it on the view. The view was built over a table that has that tag. How did the tag most likely reach the view?
A view over a tagged table is the standard example of automatic propagation through an object dependency. Inheritance works down the securable object hierarchy instead, for example from a table to its columns or from the account to a warehouse.
“Tags can be propagated when an object depends on another object (for example, a view based on a tagged table)”Source: docs.snowflake.com
Sources1
2.Creating tags with allowed values and propagation
CREATE TAG cost_center; creates a tag that accepts any value. Without controls, people will spell the same value in different ways. The ALLOWED_VALUES parameter fixes this by listing the only strings that can be used when the tag is set. A tag can have up to 5,000 allowed values, and each value can be up to 256 characters. To see a tag's list, call SYSTEM$GET_TAG_ALLOWED_VALUES. To change the list, use ALTER TAG … ADD ALLOWED_VALUES or ALTER TAG … DROP ALLOWED_VALUES.
CREATE TAG cost_center ALLOWED_VALUES 'finance', 'engineering';Changing the allowed list never rewrites existing assignments. A value you drop stays on every object that already has it. To clean these up, set the tag again on each object with a permitted value, or unset it.
The order of the list matters for one other case: a propagation conflict. A conflict arises when propagation would give an object different values of the same tag. By default Snowflake resolves it by setting the tag to the literal string CONFLICT. The ON_CONFLICT parameter on a propagating tag changes that: a custom string replaces CONFLICT, MERGE keeps all the values (only for multi-value tags), and ALLOWED_VALUES_SEQUENCE lets the list order pick the winner, with the value listed earliest winning. With CREATE TAG my_tag ALLOWED_VALUES 'blue', 'red' PROPAGATE = ON_DEPENDENCY, a conflict between blue and red resolves to blue. Without that setting, reordering the list does not change how conflicts resolve.
The PROPAGATE parameter makes a tag follow the data without anyone reapplying it. It takes one of three values:
| Setting | The tag propagates when |
|---|---|
| PROPAGATE = ON_DEPENDENCY | the target object depends on the source object |
| PROPAGATE = ON_DATA_MOVEMENT | data moves from the source object to the target object |
| PROPAGATE = ON_DEPENDENCY_AND_DATA_MOVEMENT | either of the above happens |
ALTER TAG data_sensitivity SET PROPAGATE = … changes the setting on an existing tag, and ALTER TAG data_sensitivity UNSET PROPAGATE turns propagation off.
You set a tag when you create an object with CREATE … WITH TAG, or later with ALTER … SET TAG. For a column, use CREATE TABLE, CREATE VIEW, ALTER TABLE … MODIFY COLUMN or ALTER VIEW. Column tags have their own limit: a table can have at most 50 different tags across all its columns combined, and this is separate from the 50 tags allowed on the table itself. A single CREATE TABLE or ALTER TABLE statement can make at most 100 tag-to-entity associations. Tagging every column of a 1,000-column table therefore takes ten ALTER statements.
ALTER TABLE hr.tables.empl_info MODIFY COLUMN job_title SET TAG cost_center = 'marketing';Who creates and applies tags is an organisational choice. In a centralised model, a tag_admin custom role has CREATE TAG on a schema and the global APPLY TAG privilege, and it does all the tagging. In a decentralised model, tag_admin still creates the tags so names stay consistent, but each team applies them to its own objects.
Checkpoint 2 of 8· Fill the gap
Your team wants the existing data_sensitivity tag to reach views built over tagged tables, and also tables created from them with CTAS. Which value completes this statement?
ALTER TAG data_sensitivity SET PROPAGATE = ? ;A view over a table is an object dependency, and CTAS is data movement. Only ON_DEPENDENCY_AND_DATA_MOVEMENT propagates the tag in both cases. ON_DEPENDENCY covers only the view and ON_DATA_MOVEMENT covers only the CTAS table. ALL is not a valid setting.
Source: docs.snowflake.com3.Finding tagged objects with TAG_REFERENCES
Tags are only useful for governance if you can query them. Snowflake offers the same TAG_REFERENCES data at different scopes, and the scope you need decides which one you use. All of them include an apply_method column, which tells you whether a tag was set by hand or arrived another way, such as by propagation.
SELECT tag_name, tag_value, apply_method, level, domain FROM TABLE(my_db.INFORMATION_SCHEMA.TAG_REFERENCES('my_table', 'TABLE'));| Tool | Scope | Use it when |
|---|---|---|
| INFORMATION_SCHEMA.TAG_REFERENCES | one named object | you want the tags on a specific table or warehouse |
| INFORMATION_SCHEMA.TAG_REFERENCES_ALL_COLUMNS | the columns of one table | you want every column-level tag on a table |
| ACCOUNT_USAGE.TAG_REFERENCES | the whole account | an auditor wants every object carrying a tag, with its value |
| ACCOUNT_USAGE.TAG_REFERENCES_WITH_LINEAGE | the whole account, including propagated tags | you need to trace how a tag spread from a source to dependent objects |
For an account-wide inventory, query SNOWFLAKE.ACCOUNT_USAGE.TAG_REFERENCES and filter on the tag name. One query returns every tagged object and the value set on it. Tag names don't appear in INFORMATION_SCHEMA.COLUMNS, because a tag is metadata attached to an object, not a column inside it. Searching column names for COST_CENTER would only find columns that happen to have that name. Grant views such as GRANTS_TO_ROLES show privileges, not labels.
Propagation needs its own view. Suppose a region tag set on a raw table propagates through a chain of reporting views. You could query TAG_REFERENCES on each view and match object IDs by hand, but ACCOUNT_USAGE.TAG_REFERENCES_WITH_LINEAGE is the view built for following a tag from the tagged object to the objects that got it through dependencies. Cloning the raw table proves nothing about the views: CLONE copies tags to the new table, but that is just one way a table gets tags. Time Travel keeps old versions of data. It does not keep a history of where tags went.
To work with tags in Snowsight, go to Governance & security » Tags & policies. The Tagged Objects tab there lets you filter tagged objects and columns and change their tags. This area requires Enterprise Edition or higher, plus either the ACCOUNTADMIN role or a role with the GOVERNANCE_VIEWER and OBJECT_VIEWER database roles.
Checkpoint 3 of 8· Check yourself
For an audit, you must show which tags on a table were set by hand and which reached it through propagation. What gives you that answer?
Every TAG_REFERENCES view and function returns an apply_method column, which records how the tag got onto the object, for example set by hand or propagated. Tags don't appear as columns in INFORMATION_SCHEMA.COLUMNS. GRANTS_TO_ROLES shows privileges, not tags. Time Travel keeps old versions of data, not a history of tags.
“The following views and functions include the apply_method column, which shows how a tag was associated with an object.”Source: docs.snowflake.com
Checkpoint 4 of 8· Exam question
An auditor asks a data engineer to list every table and view in the account where the tag cost_center has been applied, along with the tag value on each object. Which query approach should the engineer use?
Correct answer: A — Query SNOWFLAKE.ACCOUNT_USAGE.TAG_REFERENCES, filtering on tag_name = 'COST_CENTER' to return every object and its assigned tag value across the account.
- A. TAG_REFERENCES in ACCOUNT_USAGE records every object a tag has been assigned to along with the value set on it, which is exactly the account-wide inventory the auditor is asking for.
- B. DDL comments are free text and unrelated to the tag object; scanning them manually would miss objects tagged without a matching comment and does not query tag metadata at all.
- C. Searching column names for a literal string finds columns named after cost centers, not objects carrying the
cost_centertag, so it misses tagged tables entirely and returns false positives. - D. Grants describe role privileges, not tag assignments, so this view cannot answer which objects carry a particular tag or what value was set on them.
Checkpoint 5 of 8· Exam question
A compliance team needs to trace how a region tag applied to a raw table propagates when that table feeds a chain of downstream views used for reporting. Which mechanism gives them that lineage of tag propagation?
Correct answer: A — Query SNOWFLAKE.ACCOUNT_USAGE.TAG_REFERENCES_WITH_LINEAGE, which links a tagged object to the downstream objects that inherit the tag through dependencies.
- A. TAG_REFERENCES_WITH_LINEAGE is purpose-built to show how a tag on a source object propagates to the downstream objects that depend on it, which is the propagation trace the compliance team needs.
- B. TAG_REFERENCES only reports direct assignments on the object queried; manually joining per-view results across many objects is slow, error-prone, and does not represent an actual lineage feature.
- C. Time Travel reconstructs historical data and metadata states of a single object, not the dependency chain between that object and downstream views, so it cannot show tag propagation.
- D. Cloning copies the tags present on the source object at clone time, but it says nothing about whether existing downstream views inherit tag context, so it does not answer the lineage question.
4.Classifying sensitive data automatically
Sensitive data classification finds sensitive columns for you instead of relying on someone to tag every PII column by hand. Each column it flags gets two labels. The semantic category says what kind of personal attribute the column holds, such as a name or a national identifier. You can define custom categories for data specific to your organisation. The privacy category says how sensitive the attribute is: IDENTIFIER, QUASI_IDENTIFIER or SENSITIVE. SENSITIVE covers data that is not an identifier but still needs protecting, such as health records or salary.
Classification records its findings as tags. It sets two system tags, SNOWFLAKE.CORE.SEMANTIC_CATEGORY and SNOWFLAKE.CORE.PRIVACY_CATEGORY. A tag map links these to your own tags. For example, every time SNOWFLAKE.CORE.SEMANTIC_CATEGORY = 'NAME' is applied to a column, the tag map can also apply tag_db.sch.pii = 'Highly confidential'. From then on you track sensitive data the same way you track any other tag.
A classification profile holds the settings. If you configure classification in the Trust Center, your settings are saved as a profile, and that profile also controls which databases get classified. If you create a profile with SQL, you must associate it with a database as a separate step before classification starts. A profile can also turn on AI mode, which uses the openai-gpt-5-mini model to find more semantic categories. AI mode adds token charges on top of compute.
Monitoring classification means checking two things: how much of your data it covers and what it costs. When a database is associated with a profile, all its tables and views are classified according to that profile. To see coverage, open Trust Center » Data Security » Dashboard and find the Databases monitored by classification tile. A database shows as partially monitored when a profile was set with SQL on one of its schemas rather than on the database. You can get the same list in SQL:
SELECT SYSTEM$SHOW_SENSITIVE_DATA_MONITORED_ENTITIES('DATABASE');Classification runs on serverless compute and uses credits. Views are excluded by default because classifying a view can cost more than classifying a table, depending on how complex the view's query is. Materialized views don't have this extra cost. To track spending, go to Admin » Cost management, open Consumption, and filter Service Type to Sensitive Data Classification. In SQL, query METERING_HISTORY in ACCOUNT_USAGE.
Checkpoint 6 of 8· Check yourself
After associating a classification profile with a production database, a governance lead finds that every table has semantic and privacy category tags, but none of the reporting views do. What explains this?
Views are left out of classification unless you include them. Classifying a view can cost more than classifying a table, depending on how complex the view's query is. Setting the profile on the whole database is the normal way to get full coverage, and AI mode only finds more semantic categories.
“By default, views are excluded from classification.”Source: docs.snowflake.com
Sources5
5.Masking classified columns through their tags
Classification finds sensitive data, and tag-based masking protects it. You assign a masking policy to a tag once. From then on, every column that carries the tag is masked at query time, as long as the column's data type matches the data type in the policy's signature. If classification applies that tag through a tag map, masking happens automatically when the tag lands, including on columns in data added later. How masking policies are written is covered in masking and row access policies. This section covers only how a policy is attached to a tag.
ALTER TAG [ IF EXISTS ] <name> SET MASKING POLICY
<masking_policy_name> [ , MASKING POLICY <masking_policy_2_name> , ... ] [ FORCE ]The alternatives are worse for this job. ALTER TABLE … MODIFY COLUMN … SET MASKING POLICY also masks a column, but you have to repeat it for every column. It also misses columns that classification flags next week. A row access policy decides which rows a role can see. It does not mask the value in a column.
A few rules apply when you attach policies to tags. A tag can have only one masking policy per data type, for example one for STRING and one for NUMBER. You can't drop a tag while a masking policy is assigned to it, and you can't drop a policy while it is assigned to a tag. To replace a tag's policy in one statement, use FORCE. Unsetting the old policy and then setting the new one in two statements leaves the column unprotected for the time between them.
The directly assigned policy. When both apply to the same column, the direct policy takes precedence over the policy assigned to the tag.
Checkpoint 7 of 8· Check yourself
Classification keeps flagging new PII columns as tables are added to a database. A tag map already applies tag_db.sch.pii alongside the system classification tags. Which approach masks these columns, including ones flagged next month, without anyone running more statements?
If the policy is attached to the user-defined tag, every column that gets the tag through the tag map is masked when the tag is applied, and that includes columns found later. A policy set on a column only covers columns that already exist. A row access policy filters rows, not column values. AI mode only finds more semantic categories.
“As new data is added to a database, the tag-based masking policies are automatically assigned to the columns that contain sensitive data.”Source: docs.snowflake.com
Checkpoint 8 of 8· Exam question
A data engineer wants every column later classified and tagged pii_email across dozens of tables to automatically inherit the same masking behavior, without editing each column after classification runs. Which approach achieves this?
Correct answer: A — Create the masking policy once, then assign it directly to the tag with ALTER TAG pii_email SET MASKING POLICY email_mask, so every tagged column enforces it automatically.
- A. A masking policy assigned to a tag applies to every column carrying that tag, so newly classified columns pick up the masking behavior the moment they are tagged. This is the tag-based masking mechanism Snowflake governance relies on for scale.
- B. Attaching the policy column-by-column works but requires a manual ALTER for every table, which defeats the goal of automatic coverage as new columns get classified over time.
- C. Row access policies filter which rows a query returns; they do not redact or transform a column's value, so they cannot substitute for column-level masking of email data.
- D. Managing per-role SELECT grants does not mask the underlying value and creates a brittle privilege matrix that has to be maintained manually as roles and tables change.
Sources
(5)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Snowflake stores the tag and its string value as a key-value pair.”
↩︎ What a tag is and how it reaches an object“if a tag is set on a table, the tag will be inherited by all columns in that table.”
↩︎ What a tag is and how it reaches an object“Your account must be Enterprise Edition or higher to use the following capabilities:”
↩︎ What a tag is and how it reaches an object“You can set a maximum of 50 different tags on the columns of a single table.”
↩︎ Creating tags with allowed values and propagation“The following views and functions include the apply_method column, which shows how a tag was associated with an object.”
↩︎ Finding tagged objects with TAG_REFERENCES“Tags can be propagated when an object depends on another object (for example, a view based on a tagged table)”
↩︎ Finding tagged objects with TAG_REFERENCES“the tagged column is automatically protected by the masking policy”
↩︎ Masking classified columns through their tags“A tag is a schema-level object that can be assigned to another Snowflake object.”
↩︎ Key concept“Tags can be propagated when an object depends on another object (for example, a view based on a tagged table)”
↩︎ Checkpoint - 2.
“Users cannot assign a value to a tag unless the value is in the defined list.”
↩︎ Creating tags with allowed values and propagation“PROPAGATE = ON_DATA_MOVEMENT: The tag is propagated to a target object when data moves from the source object to the target object.”
↩︎ Creating tags with allowed values and propagation“Changing or removing an allowed value from a tag’s definition doesn’t affect tag values already assigned to objects.”
↩︎ Exam trap 1“Existing assignments keep their values even if a value is no longer in the tag’s list of allowed values.”
↩︎ Prediction - 3.
“If you don’t set this parameter and there is a conflict, the value of the tag is set to the string CONFLICT.”
↩︎ Creating tags with allowed values and propagation“If there is a conflict, then the value of my_tag will be blue because it comes before red in the allowed values list.”
↩︎ Creating tags with allowed values and propagation - 4.
“Query the Account Usage TAG_REFERENCES view to verify the existing tags set on a table or a column in a table.”
↩︎ Finding tagged objects with TAG_REFERENCES“Set the masking policy on the tag using an ALTER TAG command.”
↩︎ Masking classified columns through their tags“A tag can have only one masking policy per data type.”
↩︎ Masking classified columns through their tags“the directly assigned masking policy takes precedence over the masking policy assigned to the tag.”
↩︎ Exam trap 2 - 5.
“every column that is identified as containing sensitive data is assigned two categories: a semantic category and a privacy category.”
↩︎ Classifying sensitive data automatically“If you are using SQL, associating the classification profile with a database to start the classification process is a separate step.”
↩︎ Classifying sensitive data automatically“Sensitive data classification consumes credits as it uses serverless compute resources to classify tables in the database.”
↩︎ Classifying sensitive data automatically“the data will be automatically masked when Snowflake applies the tag as part of the classification process.”
↩︎ Masking classified columns through their tags“By default, views are excluded from classification.”
↩︎ Exam trap 3“By default, views are excluded from classification.”
↩︎ Checkpoint“As new data is added to a database, the tag-based masking policies are automatically assigned to the columns that contain sensitive data.”
↩︎ Checkpoint