0
0
Snowflakecloud~30 mins

Creating and managing shares in Snowflake - Try It Yourself

Choose your learning style9 modes available
Creating and managing shares
📖 Scenario: You are working in a Snowflake cloud data platform environment. Your team needs to share specific database objects securely with another Snowflake account. You will create a share, add database objects to it, and grant usage permissions so the other account can access the shared data.
🎯 Goal: Build a Snowflake share by creating it, adding a database and schema objects, and granting usage permissions to enable secure data sharing with another account.
📋 What You'll Learn
Create a share named my_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 account 123456789
💡 Why This Matters
🌍 Real World
Organizations often need to share data securely with partners or other departments without copying data. Snowflake shares enable this by allowing controlled access to live data.
💼 Career
Cloud data engineers and administrators use shares to manage data access and collaboration across Snowflake accounts in real-world business environments.
Progress0 / 4 steps
1
Create a share named my_share
Write a Snowflake SQL command to create a share called my_share.
Snowflake
Need a hint?

Use the CREATE SHARE statement followed by the share name.

2
Add the database sales_db to the share my_share
Write a Snowflake SQL command to add the database sales_db to the existing share my_share.
Snowflake
Need a hint?

Use ALTER SHARE with ADD DATABASE to include the database in the share.

3
Add the schema public from sales_db to the share my_share
Write a Snowflake SQL command to add the schema public from the database sales_db to the share my_share.
Snowflake
Need a hint?

Use ALTER SHARE with ADD SCHEMA specifying the database and schema name.

4
Grant usage on the share my_share to the account 123456789
Write a Snowflake SQL command to grant usage on the share my_share to the account with ID 123456789.
Snowflake
Need a hint?

Use GRANT USAGE ON SHARE followed by the share name and the target account ID.