Which command is used to create the read_only_rl role in Snowflake?

Master the SnowPro Advanced Architect Test with flashcards, multiple-choice questions, and detailed explanations. Prepare thoroughly for your certification!

Multiple Choice

Which command is used to create the read_only_rl role in Snowflake?

Explanation:
Creating a new role in Snowflake uses the CREATE ROLE statement with the role name. To establish a role named read_only_rl, you simply run: CREATE ROLE read_only_rl. This defines a new securable in Snowflake that you can later grant privileges to or assign to users or other roles. The other options try to grant or modify a role in ways that assume the role already exists or use invalid syntax. Granting a role to another role or user requires the role to be present first; altering a role to grant it to SYSADMIN isn’t valid syntax for creating a role, and mixing a comment with a grant in the same statement isn’t how Snowflake handles role descriptions (you would use COMMENT ON ROLE read_only_rl IS '...') after the role exists.

Creating a new role in Snowflake uses the CREATE ROLE statement with the role name. To establish a role named read_only_rl, you simply run: CREATE ROLE read_only_rl. This defines a new securable in Snowflake that you can later grant privileges to or assign to users or other roles.

The other options try to grant or modify a role in ways that assume the role already exists or use invalid syntax. Granting a role to another role or user requires the role to be present first; altering a role to grant it to SYSADMIN isn’t valid syntax for creating a role, and mixing a comment with a grant in the same statement isn’t how Snowflake handles role descriptions (you would use COMMENT ON ROLE read_only_rl IS '...') after the role exists.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy