Bird
Raised Fist0
Snowflakecloud~20 mins

Data classification and tagging in Snowflake - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Data Classification Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Data Classification Tags in Snowflake

Which of the following best describes the purpose of data classification tags in Snowflake?

ATo label data with metadata that helps control access and manage compliance
BTo increase the storage size of tables for better performance
CTo automatically encrypt all data in a database without user input
DTo create backups of data at regular intervals
Attempts:
2 left
💡 Hint

Think about why you would want to add labels to data in a cloud environment.

❓ Configuration
intermediate
2:00remaining
Applying a Tag to a Table Column in Snowflake

Given the tag PII already created, which SQL command correctly applies this tag to the email column of the users table?

AALTER TABLE users ALTER COLUMN email SET TAG PII = true;
BALTER TABLE users MODIFY COLUMN email SET TAG PII = 'true';
CALTER TABLE users ALTER COLUMN email SET TAGS ('PII' = 'true');
DALTER TABLE users ALTER COLUMN email SET TAG PII = 'true';
Attempts:
2 left
💡 Hint

Remember the exact syntax for setting a tag on a column in Snowflake.

❓ Architecture
advanced
2:30remaining
Designing a Tagging Strategy for Sensitive Data

You need to design a tagging strategy in Snowflake to identify and protect sensitive data across multiple schemas and databases. Which approach is best to ensure consistent classification and ease of management?

ACreate a centralized set of tags at the account level and apply them consistently across all schemas and databases
BApply tags only to tables, ignoring columns, to reduce tagging overhead
CCreate unique tags for each schema to allow schema owners full control over classification
DUse tags only on views to avoid modifying base tables
Attempts:
2 left
💡 Hint

Think about how to maintain consistency and simplify management across many data objects.

❓ security
advanced
2:30remaining
Impact of Data Classification Tags on Access Control

How can data classification tags in Snowflake be used to enhance security and access control?

ABy automatically encrypting tagged data without additional configuration
BBy integrating tags with masking policies to restrict sensitive data visibility based on user roles
CBy preventing any user from querying tagged tables unless they have admin rights
DBy duplicating tagged data into a separate secure database
Attempts:
2 left
💡 Hint

Consider how tags can work with other Snowflake features to protect data.

❓ service_behavior
expert
3:00remaining
Behavior of Tag Inheritance in Snowflake

Consider a tag Confidential applied to a database in Snowflake. Which statement best describes how this tag behaves with respect to objects within that database?

AThe tag is inherited only by tables but not by schemas within the database
BThe tag is automatically inherited by all schemas and tables within the database unless explicitly overridden
CThe tag applies only to the database object and does not propagate to schemas or tables
DThe tag is inherited by all objects in the account regardless of their location
Attempts:
2 left
💡 Hint

Think about how tagging works at different object levels in Snowflake.

Practice

(1/5)
1. What is the main purpose of data classification and tagging in Snowflake?
easy
A. To speed up query performance by indexing data
B. To convert data into different file formats
C. To automatically delete old data after a set time
D. To organize and protect data by labeling it with tags

Solution

  1. Step 1: Understand data classification and tagging

    Data classification and tagging help label data to organize and protect it.
  2. Step 2: Identify the purpose in Snowflake context

    Tags are used to mark data for governance and security, not for performance or deletion.
  3. Final Answer:

    To organize and protect data by labeling it with tags -> Option D
  4. Quick Check:

    Data classification = Organize and protect data [OK]
Hint: Tags label data to organize and protect it [OK]
Common Mistakes:
  • Confusing tagging with indexing for performance
  • Thinking tags delete data automatically
  • Assuming tags change data format
2. Which of the following is the correct syntax to create a tag in Snowflake?
easy
A. CREATE TAG tag_name COMMENT = 'description';
B. CREATE TAG tag_name WITH 'description';
C. MAKE TAG tag_name COMMENT 'description';
D. NEW TAG tag_name SET COMMENT = 'description';

Solution

  1. Step 1: Recall Snowflake tag creation syntax

    The correct syntax uses CREATE TAG followed by the tag name and COMMENT clause.
  2. Step 2: Compare options with syntax

    Only CREATE TAG tag_name COMMENT = 'description'; matches the correct syntax: CREATE TAG tag_name COMMENT = 'description';
  3. Final Answer:

    CREATE TAG tag_name COMMENT = 'description'; -> Option A
  4. Quick Check:

    CREATE TAG ... COMMENT = ... is correct syntax [OK]
Hint: Use CREATE TAG with COMMENT = 'text' [OK]
Common Mistakes:
  • Using MAKE or NEW instead of CREATE
  • Missing equal sign in COMMENT clause
  • Using WITH instead of COMMENT
3. Given the following commands, what will be the result of querying the tags on the customers table?
CREATE TAG pii COMMENT = 'Personally Identifiable Information';
ALTER TABLE customers SET TAG pii = 'true';
SHOW TAGS ON TABLE customers;
medium
A. It will show the tag 'pii' with value 'true' assigned to the customers table
B. It will show an error because tags cannot be set on tables
C. It will show the tag 'pii' but with no value assigned
D. It will show no tags because SHOW TAGS is invalid syntax

Solution

  1. Step 1: Understand tag creation and assignment

    The tag 'pii' is created and then assigned to the 'customers' table with value 'true'.
  2. Step 2: Check SHOW TAGS syntax and output

    SHOW TAGS ON TABLE customers; lists tags assigned to the table, showing 'pii' = 'true'.
  3. Final Answer:

    It will show the tag 'pii' with value 'true' assigned to the customers table -> Option A
  4. Quick Check:

    SHOW TAGS ON TABLE shows assigned tags [OK]
Hint: SHOW TAGS ON TABLE lists assigned tags and values [OK]
Common Mistakes:
  • Thinking tags cannot be assigned to tables
  • Assuming SHOW TAGS syntax is invalid
  • Expecting tags without values to appear
4. You run the following command but get an error:
ALTER TABLE orders SET TAG sensitive = 'yes';

What is the most likely cause of the error?
medium
A. ALTER TABLE cannot be used to set tags
B. The value 'yes' is not allowed for tags
C. The tag 'sensitive' was not created before assigning it
D. Tags can only be assigned to columns, not tables

Solution

  1. Step 1: Check if tag exists before assignment

    Tags must be created with CREATE TAG before assigning to tables or columns.
  2. Step 2: Analyze error cause

    If 'sensitive' tag was not created, assigning it causes an error.
  3. Final Answer:

    The tag 'sensitive' was not created before assigning it -> Option C
  4. Quick Check:

    Tags must exist before assignment [OK]
Hint: Create tags before assigning them [OK]
Common Mistakes:
  • Assuming any value is invalid
  • Thinking ALTER TABLE can't set tags
  • Believing tags only apply to columns
5. You want to classify columns in a payments table as either 'confidential' or 'public' using tags. Which approach correctly applies tags to columns and supports data governance?
hard
A. Create tags and assign them to database schemas instead of columns
B. Create tags 'confidential' and 'public', then assign them to each column with ALTER TABLE ... ALTER COLUMN ... SET TAG
C. Use column comments instead of tags to classify data sensitivity
D. Create tags and assign them only to the table, not columns, to simplify management

Solution

  1. Step 1: Understand tagging granularity

    Tags can be assigned to columns to classify data precisely, supporting governance.
  2. Step 2: Identify correct tagging method

    Using ALTER TABLE ... ALTER COLUMN ... SET TAG applies tags to columns, enabling classification.
  3. Final Answer:

    Create tags 'confidential' and 'public', then assign them to each column with ALTER TABLE ... ALTER COLUMN ... SET TAG -> Option B
  4. Quick Check:

    Column-level tags enable precise data classification [OK]
Hint: Tag columns directly for precise classification [OK]
Common Mistakes:
  • Tagging only tables loses column-level detail
  • Using comments instead of tags for governance
  • Assigning tags to schemas instead of columns
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard