A share in Snowflake is a way to securely share database objects like tables and views with other Snowflake accounts without copying data.
Click to reveal answer
beginner
How do you create a share in Snowflake?
Use the SQL command: CREATE SHARE share_name; This creates an empty share to which you can add database objects.
Click to reveal answer
intermediate
How do you add a table to a share?
Use ALTER SHARE share_name ADD TABLE database_name.schema_name.table_name; to add a table to the share.
Click to reveal answer
intermediate
What is the difference between a share and a database clone in Snowflake?
A share allows data access without copying data, while a clone creates a full copy of the database or table.
Click to reveal answer
beginner
How do you revoke access to a share?
Use DROP SHARE share_name; to remove the share and revoke access from all consumers.
Click to reveal answer
Which command creates a new share in Snowflake?
ACREATE SHARE my_share;
BCREATE DATABASE my_share;
CCREATE TABLE my_share;
DCREATE SCHEMA my_share;
✗ Incorrect
The correct command to create a share is CREATE SHARE followed by the share name.
How do you add a table named 'sales' in schema 'public' of database 'db1' to a share called 'share1'?
ACREATE SHARE share1 ADD TABLE sales;
BALTER DATABASE db1 ADD TABLE sales TO share1;
CALTER SHARE share1 ADD TABLE db1.public.sales;
DGRANT SELECT ON TABLE sales TO share1;
✗ Incorrect
You add a table to a share using ALTER SHARE with ADD TABLE and the full table path.
What happens when you DROP a share in Snowflake?
AThe share is paused but data remains accessible.
BThe share is removed and all consumers lose access.
CThe data in the share is deleted.
DThe share is converted to a clone.
✗ Incorrect
Dropping a share removes it and revokes access for all consumers, but does not delete the underlying data.
Which of the following is NOT a valid object to add to a share?
AStored procedure
BTable
CFile format
DView
✗ Incorrect
Stored procedures cannot be shared; only tables, views, and some other objects can be added to shares.
What is the main benefit of using shares in Snowflake?
AEncrypting data automatically
BCreating backups of data
CImproving query speed
DSharing data without copying it
✗ Incorrect
Shares allow secure data sharing without duplicating data, saving storage and time.
Explain the steps to create a share and add a table to it in Snowflake.
Think about first creating an empty share, then adding objects to it.
You got /3 concepts.
Describe how Snowflake shares differ from cloning databases or tables.
Focus on data duplication and access differences.
You got /4 concepts.
Practice
(1/5)
1. What is the primary purpose of creating a share in Snowflake?
easy
A. To move data from one database to another
B. To create a backup of your data
C. To share data with other accounts without copying it
D. To encrypt data for security
Solution
Step 1: Understand the concept of shares in Snowflake
Shares allow data to be shared between accounts without duplicating the data itself.
Step 2: Identify the main use case of shares
Sharing data without copying saves storage and ensures data consistency.
Final Answer:
To share data with other accounts without copying it -> Option C
Quick Check:
Shares = Data sharing without copying [OK]
Hint: Shares share data directly, no copying needed [OK]
Common Mistakes:
Thinking shares create data backups
Confusing shares with data movement
Assuming shares encrypt data automatically
2. Which Snowflake command correctly creates a share named my_share?
easy
A. ADD SHARE my_share;
B. MAKE SHARE my_share;
C. NEW SHARE my_share;
D. CREATE SHARE my_share;
Solution
Step 1: Recall the syntax for creating shares in Snowflake
The correct command to create a share is CREATE SHARE <share_name>;.
Step 2: Compare options with correct syntax
Only CREATE SHARE my_share; uses the correct CREATE SHARE syntax.
Final Answer:
CREATE SHARE my_share; -> Option D
Quick Check:
CREATE SHARE = correct command [OK]
Hint: Use CREATE SHARE to start a new share [OK]
Common Mistakes:
Using MAKE or NEW instead of CREATE
Forgetting the semicolon at the end
Confusing ADD SHARE with creating
3. Given the commands:
CREATE SHARE my_share;
GRANT USAGE ON DATABASE sales_db TO SHARE my_share;
ALTER SHARE my_share ADD ACCOUNTS = ('account_123');
What does account_123 gain access to?
medium
A. Full access to all objects in sales_db
B. Only metadata about sales_db
C. Usage access to the sales_db database objects shared
D. No access until a role is granted
Solution
Step 1: Analyze the GRANT USAGE ON DATABASE to share
Granting USAGE on a database to a share allows consumers to view database metadata (e.g., SHOW DATABASES, USE DATABASE) but not schemas, tables, or other internal objects.
Step 2: Understand the effect of adding accounts
Adding account_123 to the share provides access limited to the granted privileges: database metadata only, as no schema or table privileges are granted.
Final Answer:
Only metadata about sales_db -> Option B
Quick Check:
GRANT USAGE ON DATABASE = metadata access only [OK]
Hint: GRANT USAGE on DB shares DB metadata only; need schema/table grants for data [OK]
Common Mistakes:
Assuming full access to all objects in sales_db
Thinking DB USAGE grants access to internal objects like tables
Believing roles must be granted separately
4. You run:
CREATE SHARE my_share;
GRANT SELECT ON TABLE sales TO SHARE my_share;
But get an error. What is the likely cause?
medium
A. The table name must be fully qualified with database and schema
B. Shares cannot have privileges granted directly on tables
C. You need to add accounts to the share before granting privileges
D. You must grant privileges on the database, not the table
Solution
Step 1: Check the syntax for granting privileges on objects to shares
Privileges on tables must be granted using fully qualified names: database.schema.table.
Step 2: Identify the missing qualification in the command
The command uses just sales without database and schema, causing an error.
Final Answer:
The table name must be fully qualified with database and schema -> Option A
Quick Check:
Fully qualify table names when granting [OK]
Hint: Always use database.schema.table for grants [OK]
Common Mistakes:
Granting on database instead of table
Trying to grant privileges before adding accounts
Assuming shares can't have table privileges
5. You want to share specific tables from two different databases with multiple accounts. Which approach is best?
hard
A. Create separate shares per database and add accounts to each share accordingly
B. Create one share, grant usage on both databases, and add all tables to it
C. Copy tables into one database, then create a single share
D. Grant privileges directly to accounts without using shares
Solution
Step 1: Understand share scope and management
Shares are scoped to a single database, so sharing tables from different databases requires separate shares.
Step 2: Evaluate options for managing multiple accounts and databases
Creating separate shares per database allows clear control and easier management of access.
Step 3: Consider drawbacks of other options
Copying tables wastes storage; granting privileges directly is less secure and scalable.
Final Answer:
Create separate shares per database and add accounts to each share accordingly -> Option A
Quick Check:
Shares are per database, use multiple shares [OK]
Hint: Use one share per database for multi-db sharing [OK]
Common Mistakes:
Trying to share multiple databases in one share
Copying data instead of sharing
Granting privileges directly to accounts bypassing shares
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.