0
0
Snowflakecloud~30 mins

System-defined roles (ACCOUNTADMIN, SYSADMIN, etc.) in Snowflake - Mini Project: Build & Apply

Choose your learning style9 modes available
Understanding Snowflake System-Defined Roles
📋 What You'll Learn
💡 Why This Matters
🌍 Real World
Snowflake administrators use system-defined roles to manage permissions securely and efficiently in cloud data platforms.
💼 Career
Understanding and managing roles is essential for cloud data engineers, database administrators, and security professionals working with Snowflake.
Progress0 / 4 steps
1
Create the list of system-defined roles
Create a list variable called system_roles containing these exact strings: 'ACCOUNTADMIN', 'SYSADMIN', 'SECURITYADMIN', 'USERADMIN', and 'PUBLIC'.
Snowflake
Need a hint?
Use square brackets to create a list and include all role names as strings.
2
Create a user name variable
Create a variable called user_name and set it to the exact string 'data_analyst'.
Snowflake
Need a hint?
Assign the string 'data_analyst' to the variable user_name using an equals sign.
3
Assign the SYSADMIN role to the user
Write the exact SQL command to grant the role SYSADMIN to the user stored in user_name. Use the format: GRANT ROLE SYSADMIN TO USER data_analyst; but replace data_analyst with the variable user_name in a Python f-string called grant_command.
Snowflake
Need a hint?
Use an f-string to insert the user_name variable inside the SQL command string.
4
Add a comment about ACCOUNTADMIN role
Add a comment line explaining that the ACCOUNTADMIN role has full control over the Snowflake account. The comment should start with # and mention ACCOUNTADMIN.
Snowflake
Need a hint?
Start the comment with # and clearly mention ACCOUNTADMIN's full control.