You are viewing documentation about an older version (1.12.1). View latest version

snowflake.snowpark.functions.current_available_roles

snowflake.snowpark.functions.current_available_roles() Column[source]

Returns a JSON string that lists all roles granted to the current user.

Example

>>> # Return result is tied to session, so we only test if the result exists
>>> result = session.create_dataframe([1]).select(current_available_roles()).collect()
>>> assert result[0]['CURRENT_AVAILABLE_ROLES()'] is not None
Copy