IS_ROLE_IN_SESSION

functionsupportedAccess control (grants, roles)

docs.snowflake.com ↗

Context functions

Verifies whether the specified account role is in the currently active primary or secondary role hierarchy. This function looks only at the currently active set of roles, not at the roles activated in the session. The currently active roles can differ from the session roles, for example, when executing an owner’s rights procedure or a Streamlit.

Syntax

Literal — specify a role directly

IS_ROLE_IN_SESSION( '<string_literal>' )

Expression — specify a role expression

IS_ROLE_IN_SESSION( <expr> )

Column — specify a column

IS_ROLE_IN_SESSION( <column_name> )

Parameters

NameRequiredDescription
'string_literal'requiredThe name of the role.
exprrequiredAn expression that returns the name of the role.
column_namerequiredThe column name in a table or view that contains the name of the role.

Usage notes

See also

Referenced by