snowflake.snowpark.functions.is_granted_to_invoker_role

snowflake.snowpark.functions.is_granted_to_invoker_role(role_name: str) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.42.0/src/snowflake/snowpark/_functions/scalar_functions.py#L454-L473)

Returns True if the role returned by the INVOKER_ROLE function inherits the privileges of the specified role in the argument based on the context in which the function is called.

Parameters:

role_name (str) – The name of the role to check.

Returns:

A Snowflake Column object representing the result of the check.

Return type:

Column

Example::
>>> from snowflake.snowpark.functions import lit
>>> df = session.create_dataframe([1])
>>> result = df.select(is_granted_to_invoker_role('ANALYST').alias('RESULT')).collect()
>>> assert len(result) == 1
>>> assert isinstance(result[0]["RESULT"], bool)
Copy
Language: English