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:
| View | Type | Latency [1] | Notes |
|---|---|---|---|
| ACCESS_HISTORY | Historical | 24 hours | Premium view (only available in organization account). |
| ACCOUNTS | Object | 24 hours | |
| ALERT_HISTORY | Historical | 24 hours | Premium view (only available in organization account). |
| ANOMALIES_IN_CURRENCY_DAILY | Historical | 24 hours | |
| AUTOMATIC_CLUSTERING_HISTORY | Historical | 24 hours | Data retained for 1 year. |
| BACKUP_OPERATION_HISTORY | Historical | 6 hours | Data retained for 1 year. |
| BACKUP_POLICIES | Object | 6 hours | |
| BACKUP_SETS | Object | 6 hours | |
| BACKUPS | Object | 6 hours | |
| CLASSES | Object | 24 hours | Premium view (only available in organization account). |
| CLASS_INSTANCES | Object | 24 hours | Premium view (only available in organization account). |
| COLUMNS | Object | 24 hours | Premium view (only available in organization account). |
| COMPLETE_TASK_GRAPHS | Historical | 24 hours | Premium view (only available in organization account). |
| CONTRACT_ITEMS [2] | Historical | 24 hours | |
| COPY_HISTORY | Historical | 24 hours | Premium view (only available in organization account). |
| DATA_TRANSFER_DAILY_HISTORY | Historical | 2 hours | Data retained for 1 year. |
| DATA_TRANSFER_HISTORY | Historical | 24 hours | Data retained for 1 year. |
| DATABASE_STORAGE_USAGE_HISTORY | Historical | 24 hours | Data retained for 1 year. |
| DATABASES | Object | 24 hours | Premium view (only available in organization account). |
| FEATURE_POLICIES | Object | 24 hours | Premium view (only available in organization account). |
| FILE_FORMATS | Object | 24 hours | Premium view (only available in organization account). |
| FUNCTIONS | Object | 24 hours | Premium view (only available in organization account). |
| GRANTS_TO_ROLES | Object | 24 hours | Premium view (only available in organization account). |
| GRANTS_TO_USERS | Object | 24 hours | Premium view (only available in organization account). |
| LISTING_AUTO_FULFILLMENT_USAGE_HISTORY | Historical | 72 hours | Data retained for 1 year. |
| LOAD_HISTORY | Historical | 24 hours | Premium view (only available in organization account). |
| LOCK_WAIT_HISTORY | Historical | 24 hours | Premium view (only available in organization account). |
| LOGIN_HISTORY | Historical | 24 hours | Premium view (only available in organization account). |
| MARKETPLACE_DISBURSEMENT_REPORT | Historical | 24 hours | Data retained for 1 year. |
| MARKETPLACE_PAID_USAGE_DAILY | Historical | 24 hours | Data retained for 1 year. |
| MASKING_POLICIES | Object | 24 hours | Premium view (only available in organization account). |
| MATERIALIZED_VIEW_REFRESH_HISTORY | Historical | 24 hours | Data retained for 1 year. |
| METERING_DAILY_HISTORY | Historical | 2 hours | Data retained for 1 year. |
| METERING_HISTORY | Historical | 24 hours | Premium view (only available in organization account). |
| MONETIZED_USAGE_DAILY | Historical | 24 hours | Data retained for 1 year. |
| NETWORK_POLICIES | Object | 24 hours | Premium view (only available in organization account). |
| NETWORK_RULE_REFERENCES | Object | 24 hours | Premium view (only available in organization account). |
| NETWORK_RULES | Object | 24 hours | Premium view (only available in organization account). |
| OBJECT_DEPENDENCIES | Historical | 24 hours | Premium view (only available in organization account). |
| OUTBOUND_PRIVATELINK_ENDPOINTS | Object | 2 hours | Premium view (only available in organization account). Business Critical (or higher). Data for deleted endpoints is retained for 1 year. |
| PASSWORD_POLICIES | Object | 24 hours | Premium view (only available in organization account). |
| PIPE_USAGE_HISTORY | Historical | 24 hours | Data retained for 1 year. |
| PIPES | Object | 24 hours | Premium view (only available in organization account). |
| POLICY_REFERENCES | Object | 24 hours | Premium view (only available in organization account). |
| PROCEDURES | Object | 24 hours | Premium view (only available in organization account). |
| QUERY_ACCELERATION_ELIGIBLE | Historical | 24 hours | Premium view (only available in organization account). |
| QUERY_ACCELERATION_HISTORY | Historical | 24 hours | Data retained for 1 year. |
| QUERY_ATTRIBUTION_HISTORY | Historical | 24 hours | Premium view (only available in organization account). |
| QUERY_HISTORY | Historical | 24 hours | Premium view (only available in organization account). |
| RATE_SHEET_DAILY [2] | Historical | 24 hours | |
| REFERENTIAL_CONSTRAINTS | Object | 24 hours | Premium view (only available in organization account). |
| REMAINING_BALANCE_DAILY [2] | Historical | 72 hours | |
| REPLICATION_GROUP_REFRESH_HISTORY | Historical | 24 hours | Premium view (only available in organization account). |
| REPLICATION_GROUP_USAGE_HISTORY | Historical | 24 hours | Data retained for 1 year. |
| REPLICATION_USAGE_HISTORY | Historical | 24 hours | Data retained for 1 year. |
| RESOURCE_MONITORS | 24 hours | Premium view (only available in organization account). | |
| ROLES | Object | 24 hours | Premium view (only available in organization account). |
| ROW_ACCESS_POLICIES | Object | 24 hours | Premium view (only available in organization account). |
| SCHEMATA | Object | 24 hours | Premium view (only available in organization account). |
| SEARCH_OPTIMIZATION_HISTORY | Historical | 24 hours | Data retained for 1 year. |
| SEQUENCES | Object | 24 hours | Premium view (only available in organization account). |
| SESSION_POLICIES | Object | 24 hours | Premium view (only available in organization account). |
| SESSIONS | Historical | 24 hours | Premium view (only available in organization account). |
| SNAPSHOT_OPERATION_HISTORY | Historical | 6 hours | Data retained for 1 year. This view is deprecated. Use the BACKUP_OPERATION_HISTORY view instead. |
| SNAPSHOT_POLICIES | Object | 6 hours | This view is deprecated. Use the BACKUP_POLICIES view instead. |
| SNAPSHOT_SETS | Object | 6 hours | This view is deprecated. Use the BACKUP_SETS view instead. |
| SNAPSHOTS | Object | 6 hours | This view is deprecated. Use the BACKUPS view instead. |
| STAGES | Object | 24 hours | Premium view (only available in organization account). |
| STAGE_STORAGE_USAGE_HISTORY | Historical | 24 hours | Data retained for 1 year. |
| STORAGE_DAILY_HISTORY | Historical | 2 hours | Data retained for 1 year. |
| STORAGE_LIFECYCLE_POLICIES | Object | 24 hours | Premium view (only available in organization account). |
| STORAGE_LIFECYCLE_POLICY_HISTORY | Historical | 24 hours | Premium view (only available in organization account). Data retained for 1 year. |
| TABLE_CONSTRAINTS | Object | 24 hours | Premium view (only available in organization account). |
| TABLE_STORAGE_METRICS | Object | 24 hours | Premium view (only available in organization account). |
| TABLES | Object | 24 hours | Premium view (only available in organization account). |
| TAG_REFERENCES | Object | 24 hours | Premium view (only available in organization account). |
| TAGS | Object | 24 hours | Premium view (only available in organization account). |
| TASK_HISTORY | Historical | 24 hours | Premium view (only available in organization account). |
| TASK_VERSIONS | Object | 24 hours | Premium view (only available in organization account). |
| TRUST_CENTER_FINDINGS | Historical | 24 hours | Premium view (only available in organization account). |
| TYPES | Object | 24 hours | Premium view (only available in organization account). |
| USAGE_IN_CURRENCY_DAILY [2] | Historical | 72 hours | |
| USERS | Object | 24 hours | Premium view (only available in organization account). |
| VIEWS | Object | 24 hours | Premium view (only available in organization account). |
| WAREHOUSE_EVENTS_HISTORY | Historical | 24 hours | Premium view (only available in organization account). |
| WAREHOUSE_LOAD_HISTORY | Historical | 24 hours | Premium view (only available in organization account). |
| WAREHOUSE_METERING_HISTORY | Historical | 24 hours | Data 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:
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).
| View | Required application role |
|---|---|
| ACCESS_HISTORY view | ORGANIZATION_GOVERNANCE_VIEWER |
| ACCOUNTS view | ORGANIZATION_ACCOUNTS_VIEWER |
| ALERT_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| AUTOMATIC_CLUSTERING_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| CLASSES view | ORGANIZATION_USAGE_VIEWER |
| CLASS_INSTANCES view | ORGANIZATION_USAGE_VIEWER |
| COLUMNS view | ORGANIZATION_OBJECT_VIEWER |
| COMPLETE_TASK_GRAPHS view | ORGANIZATION_OBJECT_VIEWER |
| CONTRACT_ITEMS view | ORGANIZATION_BILLING_VIEWER |
| COPY_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| DATABASE_STORAGE_USAGE_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| DATABASES view | ORGANIZATION_OBJECT_VIEWER |
| DATA_TRANSFER_DAILY_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| DATA_TRANSFER_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| FILE_FORMATS view | ORGANIZATION_OBJECT_VIEWER |
| FUNCTIONS view | ORGANIZATION_OBJECT_VIEWER |
| GRANTS_TO_ROLES view | ORGANIZATION_SECURITY_VIEWER |
| GRANTS_TO_USERS view | ORGANIZATION_SECURITY_VIEWER |
| LISTING_AUTO_FULFILLMENT_USAGE_HISTORY view | ORGANIZATION_BILLING_VIEWER |
| LOAD_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| LOCK_WAIT_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| LOGIN_HISTORY view | ORGANIZATION_SECURITY_VIEWER |
| MARKETPLACE_DISBURSEMENT_REPORT View | ORGANIZATION_BILLING_VIEWER |
| MARKETPLACE_PAID_USAGE_DAILY View | ORGANIZATION_USAGE_VIEWER |
| MARKETPLACE_PURCHASE_EVENTS view | ORGANIZATION_BILLING_VIEWER |
| MASKING_POLICIES view | ORGANIZATION_GOVERNANCE_VIEWER |
| MATERIALIZED_VIEW_REFRESH_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| METERING_DAILY_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| METERING_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| MONETIZED_USAGE_DAILY | ORGANIZATION_USAGE_VIEWER |
| OBJECT_DEPENDENCIES view | ORGANIZATION_OBJECT_VIEWER |
| PASSWORD_POLICIES view | ORGANIZATION_SECURITY_VIEWER |
| PIPE_USAGE_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| PIPES view | ORGANIZATION_OBJECT_VIEWER |
| POLICY_REFERENCES view | ORGANIZATION_GOVERNANCE_VIEWER |
| PROCEDURES view | ORGANIZATION_OBJECT_VIEWER |
| QUERY_ACCELERATION_ELIGIBLE view | ORGANIZATION_GOVERNANCE_VIEWER |
| QUERY_ACCELERATION_HISTORY view |
|
| QUERY_ATTRIBUTION_HISTORY view |
|
| QUERY_HISTORY view | ORGANIZATION_GOVERNANCE_VIEWER |
| RATE_SHEET_DAILY view | ORGANIZATION_BILLING_VIEWER |
| REFERENTIAL_CONSTRAINTS view | ORGANIZATION_OBJECT_VIEWER |
| REMAINING_BALANCE_DAILY view | ORGANIZATION_BILLING_VIEWER |
| REPLICATION_GROUP_REFRESH_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| REPLICATION_GROUP_USAGE_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| REPLICATION_USAGE_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| RESOURCE_MONITORS view | ORGANIZATION_OBJECT_VIEWER |
| ROLES view | ORGANIZATION_SECURITY_VIEWER |
| ROW_ACCESS_POLICIES view | ORGANIZATION_GOVERNANCE_VIEWER |
| SCHEMATA view | ORGANIZATION_OBJECT_VIEWER |
| SEARCH_OPTIMIZATION_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| SEQUENCES view | ORGANIZATION_OBJECT_VIEWER |
| SESSION_POLICIES view | ORGANIZATION_SECURITY_VIEWER |
| SESSIONS view | ORGANIZATION_SECURITY_VIEWER |
| STAGE_STORAGE_USAGE_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| STAGES view | ORGANIZATION_OBJECT_VIEWER |
| STORAGE_LIFECYCLE_POLICIES view | ORGANIZATION_GOVERNANCE_VIEWER |
| STORAGE_LIFECYCLE_POLICY_HISTORY view | ORGANIZATION_GOVERNANCE_VIEWER |
| STORAGE_DAILY_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| TABLE_CONSTRAINTS view | ORGANIZATION_OBJECT_VIEWER |
| TABLE_STORAGE_METRICS view | ORGANIZATION_USAGE_VIEWER |
| TABLES view | ORGANIZATION_OBJECT_VIEWER |
| TAG_REFERENCES view | ORGANIZATION_GOVERNANCE_VIEWER |
| TAGS view | ORGANIZATION_OBJECT_VIEWER |
| TASK_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| TASK_VERSIONS view | ORGANIZATION_OBJECT_VIEWER |
| TRUST_CENTER_FINDINGS view | ORGANIZATION_SECURITY_VIEWER |
| USAGE_IN_CURRENCY_DAILY view | ORGANIZATION_BILLING_VIEWER |
| USERS view | ORGANIZATION_SECURITY_VIEWER |
| VIEWS view | ORGANIZATION_OBJECT_VIEWER |
| WAREHOUSE_EVENTS_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| WAREHOUSE_LOAD_HISTORY view | ORGANIZATION_USAGE_VIEWER |
| WAREHOUSE_METERING_HISTORY view | ORGANIZATION_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.
| View | ORGANIZATION_BILLING_VIEWER Role | ORGANIZATION_USAGE_VIEWER Role | ORGANIZATION_ACCOUNTS_VIEWER Role |
|---|---|---|---|
| ACCOUNTS view | ✔ | ||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ | |||
| ✔ |
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 *.