A share in Snowflake is a way to securely share data between different Snowflake accounts without copying the data. It allows controlled access to specific database objects.
Click to reveal answer
beginner
How does Snowflake ensure security when sharing data?
Snowflake uses access controls and encryption. Only authorized accounts can access shared data, and data is encrypted in transit and at rest.
Click to reveal answer
intermediate
What role does governance play in Snowflake data sharing?
Governance ensures that data sharing complies with policies by controlling who can create shares, what data is shared, and auditing access and usage.
Click to reveal answer
beginner
Which Snowflake object controls what data is shared?
The share object controls what database objects (tables, views) are shared and with whom.
Click to reveal answer
intermediate
How can you revoke access to shared data in Snowflake?
You can revoke access by removing the consumer account from the share or dropping the share itself.
Click to reveal answer
What does a Snowflake share NOT do?
ACopy data to the consumer account
BAllow controlled access to data
CEnable secure data sharing
DUse encryption for data security
✗ Incorrect
Snowflake shares do not copy data; they provide direct access to data without duplication.
Who can create a share in Snowflake?
AAny user with the ACCOUNTADMIN role
BAny user with read access
COnly users with the SHAREADMIN role or higher
DOnly external users
✗ Incorrect
Users with the SHAREADMIN role or higher can create shares to ensure governance.
How is data protected when shared in Snowflake?
AData is not encrypted
BData is encrypted only in transit
CData is encrypted only at rest
DData is encrypted both at rest and in transit
✗ Incorrect
Snowflake encrypts data both at rest and in transit to protect shared data.
What happens if you drop a share in Snowflake?
AConsumer accounts lose access to the shared data
BThe data is copied to the consumer account
CThe shared data is deleted
DNothing changes
✗ Incorrect
Dropping a share removes access for consumer accounts but does not delete the data.
Which object defines what data is shared in Snowflake?
ASchema
BShare
CDatabase
DWarehouse
✗ Incorrect
The share object defines which tables or views are shared and with which accounts.
Explain how Snowflake manages security when sharing data between accounts.
Think about who can see the data and how it is protected.
You got /4 concepts.
Describe the governance practices you should follow when creating and managing shares in Snowflake.
Consider policies and controls to keep data safe.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of a share in Snowflake?
easy
A. To safely share data without copying or moving it
B. To create a backup of data in another region
C. To encrypt data before storage
D. To delete data from multiple accounts
Solution
Step 1: Understand the concept of a share
A share in Snowflake allows data to be accessed by other accounts without physically moving or copying the data.
Step 2: Compare options with the concept
The options describing encryption before storage, creating backups in another region, and deleting data from multiple accounts are unrelated to sharing data safely.
Final Answer:
To safely share data without copying or moving it -> Option A
Quick Check:
Share = Safe data access without moving [OK]
Hint: Shares let others see data without moving it [OK]
Common Mistakes:
Thinking shares copy data to other accounts
Confusing shares with backups
Assuming shares encrypt data automatically
2. Which SQL command correctly grants usage on a share to a specific account in Snowflake?
easy
A. GRANT USAGE TO SHARE my_share ACCOUNT 'account_name';
B. GRANT SHARE ON USAGE my_share TO ACCOUNT 'account_name';
C. GRANT USAGE ON SHARE my_share TO ACCOUNT = 'account_name';
D. GRANT ACCOUNT USAGE ON SHARE my_share TO 'account_name';
Solution
Step 1: Recall correct GRANT syntax for shares
The correct syntax is: GRANT USAGE ON SHARE <share_name> TO ACCOUNT = '<account_name>';
Step 2: Check each option's syntax
Only GRANT USAGE ON SHARE my_share TO ACCOUNT = 'account_name'; matches the correct syntax. Others have incorrect order or missing keywords.
Final Answer:
GRANT USAGE ON SHARE my_share TO ACCOUNT = 'account_name'; -> Option C
Quick Check:
GRANT USAGE ON SHARE ... TO ACCOUNT = ... [OK]
Hint: GRANT USAGE ON SHARE ... TO ACCOUNT = 'name' [OK]
Common Mistakes:
Swapping keywords order
Omitting the equal sign after ACCOUNT
Using incorrect object types in GRANT
3. Given the following SQL commands, what will be the result when account 'A' tries to query the shared table?
CREATE SHARE my_share;
GRANT USAGE ON DATABASE my_db TO SHARE my_share;
GRANT SELECT ON TABLE my_db.public.my_table TO SHARE my_share;
GRANT USAGE ON SHARE my_share TO ACCOUNT = 'A';
medium
A. Account 'A' cannot query because database usage is not granted
B. Account 'A' can query my_table successfully
C. Account 'A' cannot query because SELECT privilege is missing
D. Account 'A' cannot query because share usage is not granted
Solution
Step 1: Check granted privileges on share
The share has USAGE on the database and SELECT on the table granted, and account 'A' has USAGE on the share.
Step 2: Confirm account 'A' can access shared data
With these grants, account 'A' can query the shared table successfully.
Final Answer:
Account 'A' can query my_table successfully -> Option B
Quick Check:
Proper grants = Access allowed [OK]
Hint: Grant database usage, table select, and share usage to account [OK]
Common Mistakes:
Forgetting to grant USAGE on database to share
Missing SELECT privilege on table
Not granting USAGE on share to account
4. You receive an error when trying to grant SELECT on a table to a share: SQL compilation error: Insufficient privileges. What is the most likely cause?
medium
A. You forgot to create the database
B. The share does not exist
C. The account name is misspelled
D. You do not have OWNERSHIP privilege on the table
Solution
Step 1: Understand privilege requirements for granting SELECT to share
Granting SELECT on a table to a share requires OWNERSHIP or appropriate privileges on that table.
Step 2: Analyze error cause
Insufficient privileges error usually means the user lacks OWNERSHIP or necessary rights on the table.
Final Answer:
You do not have OWNERSHIP privilege on the table -> Option D
Quick Check:
OWNERSHIP needed to grant SELECT to share [OK]
Hint: OWNERSHIP needed to grant privileges on objects [OK]
Common Mistakes:
Assuming share existence causes privilege errors
Confusing account name typos with privilege errors
Ignoring ownership requirements
5. You want to share a subset of data securely with multiple external accounts but restrict access to only certain tables and columns. Which Snowflake feature combination should you use?
hard
A. Create a share with specific tables and use secure views to limit columns, then grant share usage to accounts
B. Create a share with all tables and rely on account-level access control
C. Copy data to each account and grant full access
D. Use database replication to share data and restrict columns via masking policies
Solution
Step 1: Identify how to limit tables and columns in shares
Shares can include specific tables only. To restrict columns, secure views can be created exposing only allowed columns.
Step 2: Confirm how to share with multiple accounts securely
Granting USAGE on the share to multiple accounts allows controlled access without copying data.
Final Answer:
Create a share with specific tables and use secure views to limit columns, then grant share usage to accounts -> Option A