Bird
Raised Fist0
Snowflakecloud~20 mins

Share security and governance in Snowflake - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Snowflake Share Security Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Snowflake Secure Data Sharing

What is the primary security feature of Snowflake's secure data sharing that ensures the data provider retains control over the shared data?

AThe consumer can modify the shared data to suit their needs.
BThe data is copied to the consumer's account for independent use.
CThe data provider can revoke access at any time without copying data.
DThe data provider loses control once the share is created.
Attempts:
2 left
💡 Hint

Think about how Snowflake avoids data duplication in sharing.

❓ Architecture
intermediate
2:00remaining
Snowflake Share Object Components

Which components can be included in a Snowflake share object to securely share data?

ADatabases, schemas, tables, and secure views
BOnly tables and external files
CUser accounts and passwords
DVirtual warehouses and roles
Attempts:
2 left
💡 Hint

Consider what data objects are shareable in Snowflake.

❓ security
advanced
2:00remaining
Role-Based Access Control in Snowflake Shares

When sharing data in Snowflake, how does role-based access control (RBAC) affect the consumer's ability to access shared data?

AConsumers can access all shared data regardless of their roles.
BConsumers must have roles granted that match or exceed the privileges on shared objects.
CRoles are not used; access is open to any user in the consumer account.
DThe provider's roles are automatically assigned to the consumer.
Attempts:
2 left
💡 Hint

Think about how Snowflake enforces permissions on shared data.

✅ Best Practice
advanced
2:00remaining
Governance Best Practices for Snowflake Data Sharing

Which practice best supports governance when sharing data securely in Snowflake?

ADisable auditing to improve performance.
BShare entire databases without restrictions for simplicity.
CGrant the consumer account full admin privileges.
DUse secure views to limit columns and rows exposed to consumers.
Attempts:
2 left
💡 Hint

Consider how to limit data exposure while sharing.

❓ service_behavior
expert
2:00remaining
Effect of Revoking a Share in Snowflake

What happens immediately after a Snowflake data provider revokes a share from a consumer account?

AThe consumer loses all access to the shared data instantly without data copies remaining.
BThe consumer retains read access until their session ends.
CThe shared data is deleted from the consumer's account automatically.
DThe consumer can still query the data but cannot create new objects from it.
Attempts:
2 left
💡 Hint

Think about how Snowflake manages live data sharing and access control.

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

  1. 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.
  2. 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.
  3. Final Answer:

    To safely share data without copying or moving it -> Option A
  4. 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

  1. Step 1: Recall correct GRANT syntax for shares

    The correct syntax is: GRANT USAGE ON SHARE <share_name> TO ACCOUNT = '<account_name>';
  2. 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.
  3. Final Answer:

    GRANT USAGE ON SHARE my_share TO ACCOUNT = 'account_name'; -> Option C
  4. 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

  1. 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.
  2. Step 2: Confirm account 'A' can access shared data

    With these grants, account 'A' can query the shared table successfully.
  3. Final Answer:

    Account 'A' can query my_table successfully -> Option B
  4. 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

  1. 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.
  2. Step 2: Analyze error cause

    Insufficient privileges error usually means the user lacks OWNERSHIP or necessary rights on the table.
  3. Final Answer:

    You do not have OWNERSHIP privilege on the table -> Option D
  4. 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

  1. 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.
  2. Step 2: Confirm how to share with multiple accounts securely

    Granting USAGE on the share to multiple accounts allows controlled access without copying data.
  3. Final Answer:

    Create a share with specific tables and use secure views to limit columns, then grant share usage to accounts -> Option A
  4. Quick Check:

    Shares + secure views = controlled multi-account access [OK]
Hint: Use secure views inside shares to limit columns [OK]
Common Mistakes:
  • Sharing all tables without column restrictions
  • Copying data instead of sharing
  • Using replication which is for disaster recovery, not sharing
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard