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).

AUTOMATIC_CLUSTERING_HISTORY

Historical

24 hours

Data retained for 1 year.

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).

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.

MONETIZED_USAGE_DAILY

Historical

24 hours

Data retained for 1 year.

OBJECT_DEPENDENCIES

Historical

24 hours

Premium view (only available in organization account).

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_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).

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.

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).

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 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 ORG_USAGE_ADMIN TO ROLE custom_role;

GRANT ROLE custom_role TO USER joe;
Copy

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.

Using the following list to determine which application role grants access to a specific view.

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

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

  • ORGANIZATION_GOVERNANCE_VIEWER

  • ORGANIZATION_USAGE_VIEWER

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_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

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

✔

CONTRACT_ITEMS view

✔

LISTING_AUTO_FULFILLMENT_USAGE_HISTORY view

✔

RATE_SHEET_DAILY view

✔

REMAINING_BALANCE_DAILY view

✔

USAGE_IN_CURRENCY_DAILY view

✔

MARKETPLACE_DISBURSEMENT_REPORT View

✔

DATA_TRANSFER_DAILY_HISTORY view

✔

DATA_TRANSFER_HISTORY view

✔

DATABASE_STORAGE_USAGE_HISTORY view

✔

AUTOMATIC_CLUSTERING_HISTORY view

✔

MARKETPLACE_PAID_USAGE_DAILY View

✔

MATERIALIZED_VIEW_REFRESH_HISTORY view

✔

METERING_DAILY_HISTORY view

✔

MONETIZED_USAGE_DAILY View

✔

PIPE_USAGE_HISTORY view

✔

QUERY_ACCELERATION_HISTORY view

✔

REPLICATION_GROUP_USAGE_HISTORY view

✔

REPLICATION_USAGE_HISTORY view

✔

SEARCH_OPTIMIZATION_HISTORY view

✔

STAGE_STORAGE_USAGE_HISTORY view

✔

STORAGE_DAILY_HISTORY view

✔

WAREHOUSE_METERING_HISTORY 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 *.