Organization Usage

Snowflake provides historical usage data for all accounts in your organization via the ORGANIZATION_USAGE schema in a shared database named SNOWFLAKE.

ORGANIZATION_USAGE views

The ORGANIZATION_USAGE schema contains the following views:

ViewTypeLatency [1]Notes
ACCESS_HISTORYHistorical24 hoursPremium view (only available in organization account).
ACCOUNTSObject24 hours
ALERT_HISTORYHistorical24 hoursPremium view (only available in organization account).
ANOMALIES_IN_CURRENCY_DAILYHistorical24 hours
AUTOMATIC_CLUSTERING_HISTORYHistorical24 hoursData retained for 1 year.
BACKUP_OPERATION_HISTORYHistorical6 hoursData retained for 1 year.
BACKUP_POLICIESObject6 hours
BACKUP_SETSObject6 hours
BACKUPSObject6 hours
CLASSESObject24 hoursPremium view (only available in organization account).
CLASS_INSTANCESObject24 hoursPremium view (only available in organization account).
COLUMNSObject24 hoursPremium view (only available in organization account).
COMPLETE_TASK_GRAPHSHistorical24 hoursPremium view (only available in organization account).
CONTRACT_ITEMS [2]Historical24 hours
COPY_HISTORYHistorical24 hoursPremium view (only available in organization account).
DATA_TRANSFER_DAILY_HISTORYHistorical2 hoursData retained for 1 year.
DATA_TRANSFER_HISTORYHistorical24 hoursData retained for 1 year.
DATABASE_STORAGE_USAGE_HISTORYHistorical24 hoursData retained for 1 year.
DATABASESObject24 hoursPremium view (only available in organization account).
FEATURE_POLICIESObject24 hoursPremium view (only available in organization account).
FILE_FORMATSObject24 hoursPremium view (only available in organization account).
FUNCTIONSObject24 hoursPremium view (only available in organization account).
GRANTS_TO_ROLESObject24 hoursPremium view (only available in organization account).
GRANTS_TO_USERSObject24 hoursPremium view (only available in organization account).
LISTING_AUTO_FULFILLMENT_USAGE_HISTORYHistorical72 hoursData retained for 1 year.
LOAD_HISTORYHistorical24 hoursPremium view (only available in organization account).
LOCK_WAIT_HISTORYHistorical24 hoursPremium view (only available in organization account).
LOGIN_HISTORYHistorical24 hoursPremium view (only available in organization account).
MARKETPLACE_DISBURSEMENT_REPORTHistorical24 hoursData retained for 1 year.
MARKETPLACE_PAID_USAGE_DAILYHistorical24 hoursData retained for 1 year.
MASKING_POLICIESObject24 hoursPremium view (only available in organization account).
MATERIALIZED_VIEW_REFRESH_HISTORYHistorical24 hoursData retained for 1 year.
METERING_DAILY_HISTORYHistorical2 hoursData retained for 1 year.
METERING_HISTORYHistorical24 hoursPremium view (only available in organization account).
MONETIZED_USAGE_DAILYHistorical24 hoursData retained for 1 year.
NETWORK_POLICIESObject24 hoursPremium view (only available in organization account).
NETWORK_RULE_REFERENCESObject24 hoursPremium view (only available in organization account).
NETWORK_RULESObject24 hoursPremium view (only available in organization account).
OBJECT_DEPENDENCIESHistorical24 hoursPremium view (only available in organization account).
OUTBOUND_PRIVATELINK_ENDPOINTSObject2 hoursPremium view (only available in organization account). Business Critical (or higher). Data for deleted endpoints is retained for 1 year.
PASSWORD_POLICIESObject24 hoursPremium view (only available in organization account).
PIPE_USAGE_HISTORYHistorical24 hoursData retained for 1 year.
PIPESObject24 hoursPremium view (only available in organization account).
POLICY_REFERENCESObject24 hoursPremium view (only available in organization account).
PROCEDURESObject24 hoursPremium view (only available in organization account).
QUERY_ACCELERATION_ELIGIBLEHistorical24 hoursPremium view (only available in organization account).
QUERY_ACCELERATION_HISTORYHistorical24 hoursData retained for 1 year.
QUERY_ATTRIBUTION_HISTORYHistorical24 hoursPremium view (only available in organization account).
QUERY_HISTORYHistorical24 hoursPremium view (only available in organization account).
RATE_SHEET_DAILY [2]Historical24 hours
REFERENTIAL_CONSTRAINTSObject24 hoursPremium view (only available in organization account).
REMAINING_BALANCE_DAILY [2]Historical72 hours
REPLICATION_GROUP_REFRESH_HISTORYHistorical24 hoursPremium view (only available in organization account).
REPLICATION_GROUP_USAGE_HISTORYHistorical24 hoursData retained for 1 year.
REPLICATION_USAGE_HISTORYHistorical24 hoursData retained for 1 year.
RESOURCE_MONITORS24 hoursPremium view (only available in organization account).
ROLESObject24 hoursPremium view (only available in organization account).
ROW_ACCESS_POLICIESObject24 hoursPremium view (only available in organization account).
SCHEMATAObject24 hoursPremium view (only available in organization account).
SEARCH_OPTIMIZATION_HISTORYHistorical24 hoursData retained for 1 year.
SEQUENCESObject24 hoursPremium view (only available in organization account).
SESSION_POLICIESObject24 hoursPremium view (only available in organization account).
SESSIONSHistorical24 hoursPremium view (only available in organization account).
SNAPSHOT_OPERATION_HISTORYHistorical6 hoursData retained for 1 year. This view is deprecated. Use the BACKUP_OPERATION_HISTORY view instead.
SNAPSHOT_POLICIESObject6 hoursThis view is deprecated. Use the BACKUP_POLICIES view instead.
SNAPSHOT_SETSObject6 hoursThis view is deprecated. Use the BACKUP_SETS view instead.
SNAPSHOTSObject6 hoursThis view is deprecated. Use the BACKUPS view instead.
STAGESObject24 hoursPremium view (only available in organization account).
STAGE_STORAGE_USAGE_HISTORYHistorical24 hoursData retained for 1 year.
STORAGE_DAILY_HISTORYHistorical2 hoursData retained for 1 year.
STORAGE_LIFECYCLE_POLICIESObject24 hoursPremium view (only available in organization account).
STORAGE_LIFECYCLE_POLICY_HISTORYHistorical24 hoursPremium view (only available in organization account). Data retained for 1 year.
TABLE_CONSTRAINTSObject24 hoursPremium view (only available in organization account).
TABLE_STORAGE_METRICSObject24 hoursPremium view (only available in organization account).
TABLESObject24 hoursPremium view (only available in organization account).
TAG_REFERENCESObject24 hoursPremium view (only available in organization account).
TAGSObject24 hoursPremium view (only available in organization account).
TASK_HISTORYHistorical24 hoursPremium view (only available in organization account).
TASK_VERSIONSObject24 hoursPremium view (only available in organization account).
TRUST_CENTER_FINDINGSHistorical24 hoursPremium view (only available in organization account).
TYPESObject24 hoursPremium view (only available in organization account).
USAGE_IN_CURRENCY_DAILY [2]Historical72 hours
USERSObject24 hoursPremium view (only available in organization account).
VIEWSObject24 hoursPremium view (only available in organization account).
WAREHOUSE_EVENTS_HISTORYHistorical24 hoursPremium view (only available in organization account).
WAREHOUSE_LOAD_HISTORYHistorical24 hoursPremium view (only available in organization account).
WAREHOUSE_METERING_HISTORYHistorical24 hoursData retained for 1 year.

[1] All latency times are approximate; in some instances, the actual latency may be lower.

[2] The organization billing views do not display the actual, final amount because some adjustments are made at the end of the month. Customers who signed a contract through a Snowflake reseller cannot access data in these views.

Accessing the ORGANIZATION_USAGE schema

The ORGANIZATION_USAGE schema is available in the organization account and a regular account that has the ORGADMIN role enabled. How you access the views in the schema differs depending on which type of account you are using. For details about accessing views, see the following:

Note

The views in the ORGANIZATION_USAGE schema are currently not available in US SnowGov Regions on AWS GovCloud and Microsoft Azure Government.

Access schema in the organization account

By default, only users granted the GLOBALORGADMIN role can access ORGANIZATION_USAGE views in the organization account.

To grant access to other users, the organization administrator can grant the appropriate application role to an account role or user.

Users who have been granted the SNOWFLAKE.ORG_USAGE_ADMIN application role can access all views in the ORGANIZATION_USAGE schema of the organization account. The following example lets user joe access all views in the schema:

USE ROLE GLOBALORGADMIN;

GRANT APPLICATION ROLE SNOWFLAKE.ORG_USAGE_ADMIN TO ROLE custom_role;

GRANT ROLE custom_role TO USER joe;

The organization administrator can also grant access on a more granular level. For example, the ORGANIZATION_OBJECT_VIEWER application role grants access to the DATABASES view but does not grant access to the TASK_HISTORY view.

Use the following list to determine which application role grants access to a specific view. These application roles are in the SNOWFLAKE application. Use the fully qualified name of the application role when granting it to another role (for example, SNOWFLAKE.ORGANIZATION_USAGE_VIEWER).

ViewRequired application role
ACCESS_HISTORY viewORGANIZATION_GOVERNANCE_VIEWER
ACCOUNTS viewORGANIZATION_ACCOUNTS_VIEWER
ALERT_HISTORY viewORGANIZATION_USAGE_VIEWER
AUTOMATIC_CLUSTERING_HISTORY viewORGANIZATION_USAGE_VIEWER
CLASSES viewORGANIZATION_USAGE_VIEWER
CLASS_INSTANCES viewORGANIZATION_USAGE_VIEWER
COLUMNS viewORGANIZATION_OBJECT_VIEWER
COMPLETE_TASK_GRAPHS viewORGANIZATION_OBJECT_VIEWER
CONTRACT_ITEMS viewORGANIZATION_BILLING_VIEWER
COPY_HISTORY viewORGANIZATION_USAGE_VIEWER
DATABASE_STORAGE_USAGE_HISTORY viewORGANIZATION_USAGE_VIEWER
DATABASES viewORGANIZATION_OBJECT_VIEWER
DATA_TRANSFER_DAILY_HISTORY viewORGANIZATION_USAGE_VIEWER
DATA_TRANSFER_HISTORY viewORGANIZATION_USAGE_VIEWER
FILE_FORMATS viewORGANIZATION_OBJECT_VIEWER
FUNCTIONS viewORGANIZATION_OBJECT_VIEWER
GRANTS_TO_ROLES viewORGANIZATION_SECURITY_VIEWER
GRANTS_TO_USERS viewORGANIZATION_SECURITY_VIEWER
LISTING_AUTO_FULFILLMENT_USAGE_HISTORY viewORGANIZATION_BILLING_VIEWER
LOAD_HISTORY viewORGANIZATION_USAGE_VIEWER
LOCK_WAIT_HISTORY viewORGANIZATION_USAGE_VIEWER
LOGIN_HISTORY viewORGANIZATION_SECURITY_VIEWER
MARKETPLACE_DISBURSEMENT_REPORT ViewORGANIZATION_BILLING_VIEWER
MARKETPLACE_PAID_USAGE_DAILY ViewORGANIZATION_USAGE_VIEWER
MARKETPLACE_PURCHASE_EVENTS viewORGANIZATION_BILLING_VIEWER
MASKING_POLICIES viewORGANIZATION_GOVERNANCE_VIEWER
MATERIALIZED_VIEW_REFRESH_HISTORY viewORGANIZATION_USAGE_VIEWER
METERING_DAILY_HISTORY viewORGANIZATION_USAGE_VIEWER
METERING_HISTORY viewORGANIZATION_USAGE_VIEWER
MONETIZED_USAGE_DAILYORGANIZATION_USAGE_VIEWER
OBJECT_DEPENDENCIES viewORGANIZATION_OBJECT_VIEWER
PASSWORD_POLICIES viewORGANIZATION_SECURITY_VIEWER
PIPE_USAGE_HISTORY viewORGANIZATION_USAGE_VIEWER
PIPES viewORGANIZATION_OBJECT_VIEWER
POLICY_REFERENCES viewORGANIZATION_GOVERNANCE_VIEWER
PROCEDURES viewORGANIZATION_OBJECT_VIEWER
QUERY_ACCELERATION_ELIGIBLE viewORGANIZATION_GOVERNANCE_VIEWER
QUERY_ACCELERATION_HISTORY view
  • ORGANIZATION_GOVERNANCE_VIEWER
  • ORGANIZATION_USAGE_VIEWER
QUERY_ATTRIBUTION_HISTORY view
  • ORGANIZATION_GOVERNANCE_VIEWER
  • ORGANIZATION_USAGE_VIEWER
QUERY_HISTORY viewORGANIZATION_GOVERNANCE_VIEWER
RATE_SHEET_DAILY viewORGANIZATION_BILLING_VIEWER
REFERENTIAL_CONSTRAINTS viewORGANIZATION_OBJECT_VIEWER
REMAINING_BALANCE_DAILY viewORGANIZATION_BILLING_VIEWER
REPLICATION_GROUP_REFRESH_HISTORY viewORGANIZATION_USAGE_VIEWER
REPLICATION_GROUP_USAGE_HISTORY viewORGANIZATION_USAGE_VIEWER
REPLICATION_USAGE_HISTORY viewORGANIZATION_USAGE_VIEWER
RESOURCE_MONITORS viewORGANIZATION_OBJECT_VIEWER
ROLES viewORGANIZATION_SECURITY_VIEWER
ROW_ACCESS_POLICIES viewORGANIZATION_GOVERNANCE_VIEWER
SCHEMATA viewORGANIZATION_OBJECT_VIEWER
SEARCH_OPTIMIZATION_HISTORY viewORGANIZATION_USAGE_VIEWER
SEQUENCES viewORGANIZATION_OBJECT_VIEWER
SESSION_POLICIES viewORGANIZATION_SECURITY_VIEWER
SESSIONS viewORGANIZATION_SECURITY_VIEWER
STAGE_STORAGE_USAGE_HISTORY viewORGANIZATION_USAGE_VIEWER
STAGES viewORGANIZATION_OBJECT_VIEWER
STORAGE_LIFECYCLE_POLICIES viewORGANIZATION_GOVERNANCE_VIEWER
STORAGE_LIFECYCLE_POLICY_HISTORY viewORGANIZATION_GOVERNANCE_VIEWER
STORAGE_DAILY_HISTORY viewORGANIZATION_USAGE_VIEWER
TABLE_CONSTRAINTS viewORGANIZATION_OBJECT_VIEWER
TABLE_STORAGE_METRICS viewORGANIZATION_USAGE_VIEWER
TABLES viewORGANIZATION_OBJECT_VIEWER
TAG_REFERENCES viewORGANIZATION_GOVERNANCE_VIEWER
TAGS viewORGANIZATION_OBJECT_VIEWER
TASK_HISTORY viewORGANIZATION_USAGE_VIEWER
TASK_VERSIONS viewORGANIZATION_OBJECT_VIEWER
TRUST_CENTER_FINDINGS viewORGANIZATION_SECURITY_VIEWER
USAGE_IN_CURRENCY_DAILY viewORGANIZATION_BILLING_VIEWER
USERS viewORGANIZATION_SECURITY_VIEWER
VIEWS viewORGANIZATION_OBJECT_VIEWER
WAREHOUSE_EVENTS_HISTORY viewORGANIZATION_USAGE_VIEWER
WAREHOUSE_LOAD_HISTORY viewORGANIZATION_USAGE_VIEWER
WAREHOUSE_METERING_HISTORY viewORGANIZATION_USAGE_VIEWER

Access schema in an ORGADMIN-enabled account

An ORGADMIN-enabled account is a regular account that has the ORGADMIN role enabled. Within a ORGADMIN-enabled account, anyone who has access to the shared SNOWFLAKE database has access to the ORGANIZATION_USAGE schema. By default, only the ACCOUNTADMIN role has privileges to this database, which means the ORGADMIN role does not have the necessary privileges. To grant these privileges to the ORGADMIN role, see Enabling other roles to use schemas in the SNOWFLAKE database.

To grant access to non-administrators, the organization administrator can grant the appropriate database role to an account role or user.

Using the following list to determine which database role grants access to specific views.

The ORGANIZATION_USAGE_VIEWER, ORGANIZATION_BILLING_VIEWER, and ORGANIZATION_ACCOUNTS_VIEWER SNOWFLAKE database roles are granted the SELECT privilege on Organization Usage views in the shared SNOWFLAKE database.

For more information, refer to GRANT DATABASE ROLE.

General usage notes

The Snowflake-specific views are subject to change. Avoid selecting all columns from these views. Instead, select the columns that you want. For example, if you want the name column, use SELECT name, rather than SELECT *.