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});
More Related questions...