IS_DATABASE_ROLE_IN_SESSION

functionsupportedAccess control (grants, roles)

docs.snowflake.com ↗

Context functions

Verifies whether the database role is in the user’s active primary or secondary role hierarchy for the current session or if the specified column contains a database role that is in the user’s active primary or secondary role hierarchy for the current session.

Syntax

Literal — specify a database role directly

IS_DATABASE_ROLE_IN_SESSION( '<string_literal>' )

Nonliteral — specify a column

IS_DATABASE_ROLE_IN_SESSION( <column_name> )

Parameters

NameRequiredDescription
'string_literal'requiredThe name of the database role. Specify the relative name of the database role. The function evaluates to False if you specify the fully qualified name.
column_namerequiredThe column name in a table or view.

Usage notes

See also

Referenced by