SNOWFLAKE.ORGANIZATION_USAGE.WAREHOUSE_METERING_HISTORY
- Returns hourly credit usage for both Virtual Warehouse credit usage and Cloud Services credit usage per warehouse, for all warehouses in your account. Data is retained for one year.
SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY
- Query history with various dimensions, including total elapsed time, warehouse used, data bytes scanned, etc. Data is retained for one year.
SNOWFLAKE.ORGANIZATION_USAGE.USAGE_IN_CURRENCY_DAILY
- Returns the daily credit usage and usage in currency format for an organization.
As a best practice, it is suggested you create a schema specifically for the
vantage
user. Note, however, that this is optional. See the steps below for details on how to create this schema.Connect Your Snowflake Account
Prerequisites
Create a free Vantage account, then follow the steps below to integrate Snowflake costs.Snowflake IP Allowed List
If your Snowflake cluster uses an IP allow list for access control, you will need to add the following IPs to that allowed list:Snowflake Schema for Vantage
After creating the below schema, you can add the required views to that schema and grant thevantage
user access to the schema.
The below commands are based on the Snowflake documentation.
1
From the top navigation in Vantage, click Settings.
2
On the left navigation, select Integrations and select Snowflake.
3
The Snowflake integrations page is displayed. Ensure you are on the Connect tab.
4
Copy the code that’s provided under Create Vantage User and Role to Snowflake. This SQL creates a user named
vantage
, a role named vantage
, and a warehouse named vantage
. It also grants the necessary permissions.Vantage automatically generates an RSA public key for you to use when creating the Vantage user and role. You need to copy the code directly from the Vantage integration page to add the RSA key.
Sample of code. Copy directly from Vantage console to get RSA key.
5
Copy the next code block to set up the Vantage-specific schema to read billing and usage data from your account.
6
Test your setup in Snowflake.
7
At the bottom of the Vantage console Snowflake integration page, click Add Connection.
8
Add the following information to the form:
- Server URL: In the format
<account_identifier>.<region>.snowflakecomputing.com
. - Database: The name of the database the usage views are in (e.g.,
vantage
). - Schema: The name of the schema the usage views are in (e.g.,
public
). - Username set for the
vantage
user.
9
Click Connect Account.
Next Steps - Manage Workspace Access
Once your costs are imported, select which workspaces this integration is associated with. See the Workspaces documentation for information.Data Refresh
See the provider data refresh documentation for information on when data for each provider refreshes in Vantage.Troubleshoot Snowflake Errors
Snowflake occasionally makes changes to the queries/tables that get used for cost and usage attribution, causing the views in Vantage to then be based on an old query. You may see an error in the Vantage console, similar to the below error:Vantage
views in Snowflake and ensure the vantage
user is granted permission on those views.
After you’ve completed the below steps, contact support@vantage.sh to reimport your Snowflake data.
Snowflake Reporting Dimensions
On Snowflake Cost Reports, you can filter across several dimensions:- Account (account name)
- Category (e.g., Data Cloud Data Transfer)
- Metadata (e.g.,
environment is staging
) - Region (e.g., AWS Eu West 1)
- Organization (organization name)
- Service (e.g., Data Cloud)
- Tag
- Charge Type (e.g., Usage)