Schema:

ACCOUNT_USAGE

ROLES view

This Account Usage view can be used to query a list of all roles defined in the account. The data is retained for 365 days (1 year).

Columns

Column NameData TypeDescription
ROLE_IDNUMBERInternal/system-generated identifier for the role.
CREATED_ONTIMESTAMP_LTZDate and time (in the UTC time zone) when the role was created.
DELETED_ONTIMESTAMP_LTZDate and time (in the UTC time zone) when the role was deleted.
NAMEVARCHARName of the role.
COMMENTVARCHARComment for the role.
OWNERVARCHARRole with the OWNERSHIP privilege on the object.
ROLE_TYPEVARCHAREither ROLE, DATABASE_ROLE, INSTANCE_ROLE, or APPLICATION_ROLE.
ROLE_DATABASE_NAMEVARCHARName of the database that contains the database role if the role is a database role.
ROLE_INSTANCE_IDNUMBERInternal/system-generated identifier for the class instance that the role belongs to.
OWNER_ROLE_TYPEVARCHARThe type of role that owns the object, for example ROLE.
If a Snowflake Native App owns the object, the value is APPLICATION.
Snowflake returns NULL if you delete the object because a deleted object does not have an owner role.
IS_FROM_ORGANIZATION_USER_GROUPBOOLEANIf TRUE, the role was imported from an organization user group.

Usage notes

  • Latency for the view may be up to 120 minutes (2 hours).
  • The view does not include database roles for databases created from shares.

Internal Snowflake role for Snowsight

The first time Snowsight is accessed in an account, Snowflake creates the internal APPADMIN and WORKSHEETS_APP_RL roles to support the web interface. These roles are used to cache query results in an internal stage in your account. This cached data is encrypted and protected by the key hierarchy for the account. The limited privileges granted to these internal roles only allow Snowsight to access the internal stage to store those results. Thes roles cannot list objects in your account or access data in your tables. For more information, see Getting started with Snowsight.