0
0
Snowflakecloud~30 mins

Secure data sharing basics in Snowflake - Mini Project: Build & Apply

Choose your learning style9 modes available
Secure data sharing basics
📖 Scenario: You work at a company that uses Snowflake for data storage. You want to share a specific dataset securely with a partner company without copying the data. Snowflake's secure data sharing lets you do this safely and efficiently.
🎯 Goal: Create a secure data share in Snowflake, add a database and schema to it, grant usage rights, and then create a share consumer account to access the shared data.
📋 What You'll Learn
Create a share named partner_share
Add the database sales_db to the share
Add the schema public from sales_db to the share
Grant usage on the share to the consumer account partner_account
Create a database from the share in the consumer account named shared_sales_db
💡 Why This Matters
🌍 Real World
Companies often need to share data securely with partners without copying or moving large datasets. Snowflake's secure data sharing enables this efficiently.
💼 Career
Understanding secure data sharing is essential for cloud data engineers and architects working with Snowflake to enable collaboration and data monetization.
Progress0 / 4 steps
1
Create a secure share
Write a Snowflake SQL command to create a share called partner_share.
Snowflake
Need a hint?

Use the CREATE SHARE statement followed by the share name.

2
Add database and schema to the share
Write Snowflake SQL commands to add the database sales_db and its schema public to the share partner_share.
Snowflake
Need a hint?

Use ALTER SHARE partner_share ADD DATABASE sales_db; and ALTER SHARE partner_share ADD SCHEMA sales_db.public;.

3
Grant usage on the share to the consumer account
Write a Snowflake SQL command to grant usage on the share partner_share to the consumer account partner_account.
Snowflake
Need a hint?

Use GRANT USAGE ON SHARE partner_share TO ACCOUNT partner_account; to allow the consumer account to access the share.

4
Create a database from the share in the consumer account
In the consumer account, write a Snowflake SQL command to create a database named shared_sales_db from the share partner_account.partner_share.
Snowflake
Need a hint?

Use CREATE DATABASE shared_sales_db FROM SHARE partner_account.partner_share; in the consumer account to access the shared data.