0
0
Snowflakecloud~10 mins

Creating custom roles in Snowflake - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a new role named 'data_analyst'.

Snowflake
CREATE ROLE [1];
Drag options to blanks, or click blank then click option'
Adata_analyst
Banalyst_data
Crole_data
DdataRole
Attempts:
3 left
💡 Hint
Common Mistakes
Using an incorrect role name.
Forgetting the CREATE ROLE statement.
2fill in blank
medium

Complete the code to grant the 'SELECT' privilege on the 'sales' schema to the role.

Snowflake
GRANT SELECT ON SCHEMA sales TO ROLE [1];
Drag options to blanks, or click blank then click option'
Adata_analyst
Bguest
Cuser_role
Dadmin
Attempts:
3 left
💡 Hint
Common Mistakes
Granting privileges to the wrong role.
Using incorrect syntax for the GRANT statement.
3fill in blank
hard

Fix the error in the code to assign the role 'data_analyst' to the user 'alice'.

Snowflake
GRANT ROLE [1] TO USER alice;
Drag options to blanks, or click blank then click option'
Aanalyst_data
Bdata_analyst
CdataAnalyst
Danalyst
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect role names with different casing.
Misspelling the role name.
4fill in blank
hard

Fill both blanks to revoke the 'SELECT' privilege from the role on the 'marketing' schema.

Snowflake
REVOKE [1] ON SCHEMA marketing FROM ROLE [2];
Drag options to blanks, or click blank then click option'
ASELECT
BINSERT
Cdata_analyst
Dadmin
Attempts:
3 left
💡 Hint
Common Mistakes
Revoking the wrong privilege.
Using the wrong role name.
5fill in blank
hard

Fill all three blanks to create a custom role 'report_viewer', grant it USAGE on the 'reports' database, and assign it to user 'bob'.

Snowflake
CREATE ROLE [1];
GRANT USAGE ON DATABASE reports TO ROLE [2];
GRANT ROLE [3] TO USER bob;
Drag options to blanks, or click blank then click option'
Areport_viewer
Ddata_analyst
Attempts:
3 left
💡 Hint
Common Mistakes
Using different role names in the commands.
Forgetting to grant USAGE privilege before assignment.