CURRENT_SECONDARY_ROLES
functionsupportedAccess control (grants, roles)Returns the secondary roles in use for the current session. To activate a different set of secondary roles for the session, execute the USE SECONDARY ROLES command.
Syntax
CURRENT_SECONDARY_ROLES()
Returns
Returns a string (VARCHAR) that is a JSON-encoded object containing the following name/value pairs:
Usage notes
- Granting access on a secure UDF or secure view that contains CURRENT_SECONDARY_ROLES to a share is allowed. When the secure UDF or secure view is accessed from the data-sharing consumer account, CURRENT_SECONDARY_ROLES always returns a NULL value.