Exploring Overall Cost¶
You can explore historical cost using Snowsight, the Snowflake web interface, or by writing queries against views in the ACCOUNT_USAGE and ORGANIZATION_USAGE schemas. Snowsight allows you to quickly and easily obtain information about cost from a visual dashboard. Queries against the usage views allow you to drill down into cost data and can help generate custom reports and dashboards.
If you need an introduction to how costs are incurred in Snowflake, refer to Understanding Overall Cost.
To obtain a billing statement that contains information about historical usage, see Billing & Terms.
Viewing Overall Cost¶
A user with the ACCOUNTADMIN and ORGADMIN roles can use Snowsight to view the overall cost of using Snowflake for any given day, week, or month.
Note
If a user has the ACCOUNTADMIN role, but does not have the ORGADMIN role, they must view costs for compute, storage, and data transfer separately. They cannot use Snowsight to view overall cost.
To use Snowsight to explore overall cost:
Sign in to Snowsight as a user who has the ACCOUNTADMIN and ORGADMIN roles.
Switch to the ACCOUNTADMIN role.
Navigate to Admin » Usage.
Select a warehouse to use to view the usage data. Snowflake recommends using an XS warehouse for this purpose.
Select All Usage Types from the drop-down list.
This totals the cost of compute, storage, and data transfer resources and displays them in a bar graph using the organization’s currency. The total cost of these resources during the selected time period appears above the bar graph.
Note
If the usage details fail to load with a message indicating that The result set is too large to display, you must use the filters to select a shorter date range or otherwise filter the results.
Querying Data for Overall Cost¶
Snowflake provides two schemas, ORGANIZATION_USAGE and ACCOUNT_USAGE, that contain data related to usage and cost. The ORGANIZATION_USAGE schema provides cost information for all of the accounts in the organization while the ACCOUNT_USAGE schema provides similar information for a single account. Views in these schemas provide granular, analytics-ready usage data to build custom reports or dashboards.
The following query combines data from the USAGE_IN_CURRENCY view in the ORGANIZATION_USAGE schema in order to gain insight into the overall cost of using Snowflake.
- Query: Total usage costs in dollars for the organization, broken down by account
SELECT account_name, ROUND(SUM(usage_in_currency), 2) as usage_in_currency FROM snowflake.organization_usage.usage_in_currency_daily WHERE usage_date > DATEADD(month,-1,CURRENT_TIMESTAMP()) GROUP BY 1 ORDER BY 2 desc;
Next Topics