SnowPro Core Certification — Question 571
What criteria does Snowflake use to determine the current role when initiating a session? (Choose two.)
Answer options
- A. If a role was specified as part of the connection and that role has been granted to the Snowflake user, the specified role becomes the current role.
- B. If no role was specified as part of the connection and a default role has been defined for the Snowflake user, that role becomes the current role.
- C. If no role was specified as part of the connection and a default role has not been set for the Snowflake user, the session will not be initiated and the log in will fail.
- D. If a role was specified as part of the connection and that role has not been granted to the Snowflake user, it will be ignored and the default role will become the current role.
- E. If a role was specified as part of the connection and that role has not been granted to the Snowflake user, the role is automatically granted and it becomes the current role.
Correct answer: A, B
Explanation
Option A is correct because if a specified role is granted to the user, it becomes the current role. Option B is also correct as it sets the default role if none is specified. Options C, D, and E are incorrect because they do not accurately reflect the behavior of role assignment in Snowflake sessions.