Database / Snowflake Interview Questions
What are Snowflake Object Tags and Data Classification and how do they support governance?
Object Tags are key-value string metadata labels that can be attached to any Snowflake object — accounts, databases, schemas, tables, columns, warehouses, or other named resources. Tags give governance teams a structured way to label assets by sensitivity level, data domain, cost center, or regulatory category without changing the underlying schema.
Tag lineage is the automatic propagation behavior: a tag set on a schema propagates to all tables in that schema; a tag set on a table propagates to all its columns. Tags can be overridden at a lower level. This means you can mark an entire schema as sensitivity=high and every column inherits that classification automatically, saving thousands of individual tag assignments.
Data Classification uses Snowflake's SYSTEM$CLASSIFY() function (or the automated classification in Snowsight) to automatically inspect column names and sample values, then suggest PII categories: personal name, email address, phone number, SSN, date of birth, credit card number, IP address, and others. You can accept the suggestions and apply them as tags.
Governance views: SNOWFLAKE.ACCOUNT_USAGE.TAG_REFERENCES shows every tag assignment across the account. Combined with ACCESS_HISTORY, you can produce reports like 'who queried tagged PII columns in the last 30 days'.
-- Create a tag
CREATE TAG sensitivity ALLOWED_VALUES 'high', 'medium', 'low';
-- Apply a tag to a table (propagates to all columns)
ALTER TABLE customers SET TAG sensitivity = 'high';
-- Apply a different tag directly to one column
ALTER TABLE customers MODIFY COLUMN ssn SET TAG sensitivity = 'high';
-- Run automated classification on a table
SELECT SYSTEM$CLASSIFY('mydb.myschema.customers', {'auto_tag': true});
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
