0
0
Snowflakecloud~10 mins

Role hierarchy in Snowflake - Interactive Code Practice

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

Complete the code to grant a role to another role in Snowflake.

Snowflake
GRANT ROLE [1] TO ROLE analyst_role;
Drag options to blanks, or click blank then click option'
Aadmin_role
Bfinance_role
Cread_only
Ddata_scientist
Attempts:
3 left
💡 Hint
Common Mistakes
Using a role that should receive privileges instead of the one granting them.
Confusing role names.
2fill in blank
medium

Complete the code to show the roles granted to a specific role.

Snowflake
SHOW GRANTS TO ROLE [1];
Drag options to blanks, or click blank then click option'
Afinance_role
Banalyst_role
Cdata_engineer
Dadmin_role
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong role name in the command.
Confusing 'TO' with 'OF' in the command syntax.
3fill in blank
hard

Fix the error in the code to correctly revoke a role from another role.

Snowflake
REVOKE ROLE [1] FROM ROLE sales_role;
Drag options to blanks, or click blank then click option'
Afinance_role
Bsales_role
Cdata_analyst
Dmarketing_role
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to revoke the role from itself.
Using a role that was never granted.
4fill in blank
hard

Fill both blanks to create a role hierarchy where 'manager_role' inherits from 'employee_role'.

Snowflake
GRANT ROLE [1] TO ROLE [2];
Drag options to blanks, or click blank then click option'
Aemployee_role
Badmin_role
Cmanager_role
Danalyst_role
Attempts:
3 left
💡 Hint
Common Mistakes
Reversing the roles in the grant statement.
Granting a higher role to a lower role.
5fill in blank
hard

Fill all three blanks to list all roles granted to 'developer_role' and then revoke one role.

Snowflake
SHOW GRANTS TO ROLE [1];
REVOKE ROLE [2] FROM ROLE [3];
Drag options to blanks, or click blank then click option'
Adeveloper_role
Bintern_role
Dcontractor_role
Attempts:
3 left
💡 Hint
Common Mistakes
Using different roles inconsistently in the commands.
Revoking a role from a role that does not have it.