What is object tagging in Snowflake, and how do tag-based masking policies work?

Quick Overview

Asks what object tagging is in Snowflake and how tag-based masking policies protect the columns that carry a tag. It tests data governance knowledge: tag assignment and inheritance, binding policies by data type, precedence rules, and auditing where sensitive data lives.

What is object tagging in Snowflake, and how do tag-based masking policies work?

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Other

What is object tagging in Snowflake, and how do tag-based masking policies work? ```hint Where the policy attaches Compare attaching a masking policy to each column with attaching it to something the columns carry. What happens when someone adds a new sensitive column next month? ``` ```hint Edge cases Think about a tagged column whose data type does not match the policy, and a column that already has a masking policy of its own. ``` ### What a Strong Answer Covers - What a tag is as an object: where it lives, how values are set, what it can be attached to, and how it is inherited - How a masking policy is bound to a tag and how a tagged column picks up masking at query time - How a policy can use the tag's value and the querying role to decide what to return - Data-type matching and precedence when a column also has a directly assigned policy - How to audit which objects carry tags and which policies apply ### Follow-up Questions - How would one tag-based policy mask email addresses and phone numbers differently? - How would you find columns that hold personal data but carry no tag? - How would you split privileges so data engineers can tag columns but cannot change what the masking does? - How can tags on warehouses support cost attribution by team?

Overview: Asks what object tagging is in Snowflake and how tag-based masking policies protect the columns that carry a tag. It tests data governance knowledge: tag assignment and inheritance, binding policies by data type, precedence rules, and auditing where sensitive data lives.

PracHub logo
General
Nov 24, 2026
mediumData ScientistOtherData Manipulation (SQL/Python)
0
0

What is object tagging in Snowflake, and how do tag-based masking policies work?

What a Strong Answer Covers Guidance

  • What a tag is as an object: where it lives, how values are set, what it can be attached to, and how it is inherited
  • How a masking policy is bound to a tag and how a tagged column picks up masking at query time
  • How a policy can use the tag's value and the querying role to decide what to return
  • Data-type matching and precedence when a column also has a directly assigned policy
  • How to audit which objects carry tags and which policies apply

Follow-up Questions Guidance

  • How would one tag-based policy mask email addresses and phone numbers differently?
  • How would you find columns that hold personal data but carry no tag?
  • How would you split privileges so data engineers can tag columns but cannot change what the masking does?
  • How can tags on warehouses support cost attribution by team?