snowflake.snowpark.Session.use_secondary_rolesΒΆ

Session.use_secondary_roles(roles: Optional[Literal['all', 'none']]) β†’ None[source]ΒΆ

Specifies the active/current secondary roles for the session. The currently-active secondary roles set the context that determines whether the current user has the necessary privileges to perform SQL actions.

Parameters:

roles – β€œall” or β€œnone”. None means β€œnone”.

References: Snowflake command USE SECONDARY ROLES.