0
0
Snowflakecloud~30 mins

Why governance ensures data trust at scale in Snowflake - See It in Action

Choose your learning style9 modes available
Why governance ensures data trust at scale
📖 Scenario: You are working in a company that uses Snowflake to store and manage data. The company wants to make sure that all data is accurate, secure, and easy to find for everyone who needs it. This is important because many teams use the data to make decisions, and they must trust it.To do this, the company needs to set up data governance. This means creating rules and controls that manage who can see and change data, how data is organized, and how to check data quality.
🎯 Goal: Build a simple Snowflake setup that shows how data governance helps keep data trustworthy. You will create a table with data, add a role to control access, and set up a policy to protect sensitive information.
📋 What You'll Learn
Create a Snowflake table with sample data
Create a role to manage access to the table
Grant the role SELECT permission on the table
Create a masking policy to protect sensitive data
Apply the masking policy to a column in the table
💡 Why This Matters
🌍 Real World
Companies use data governance in Snowflake to make sure data is accurate, secure, and only seen by the right people. This helps teams trust the data when making decisions.
💼 Career
Understanding how to create roles, grant permissions, and apply masking policies in Snowflake is important for data engineers, cloud architects, and security professionals to maintain data trust at scale.
Progress0 / 4 steps
1
Create a Snowflake table with sample data
Write a Snowflake SQL command to create a table called customer_data with columns customer_id (integer), customer_name (string), and email (string). Then insert these exact rows: (1, 'Alice', 'alice@example.com'), (2, 'Bob', 'bob@example.com'), (3, 'Charlie', 'charlie@example.com').
Snowflake
Need a hint?

Use CREATE OR REPLACE TABLE to create the table and INSERT INTO to add rows.

2
Create a role to manage access
Write a Snowflake SQL command to create a role called data_viewer that will be used to control who can see the customer_data table.
Snowflake
Need a hint?

Use CREATE ROLE data_viewer; to create the role.

3
Grant the role SELECT permission on the table
Write a Snowflake SQL command to grant the data_viewer role the SELECT permission on the customer_data table.
Snowflake
Need a hint?

Use GRANT SELECT ON TABLE customer_data TO ROLE data_viewer; to give read access.

4
Create and apply a masking policy to protect sensitive data
Write Snowflake SQL commands to create a masking policy called email_masking_policy that shows the full email only to users with the data_viewer role and masks it as '****@****.com' for others. Then apply this masking policy to the email column of the customer_data table.
Snowflake
Need a hint?

Use CREATE MASKING POLICY with CURRENT_ROLE() to check roles, then ALTER TABLE ... MODIFY COLUMN ... SET MASKING POLICY to apply it.