Skip to main content

Work with Snowflake data

Once you've imported your Snowflake data into the DoiT platform, you can start using Cloud Analytics and other DoiT features such as Budgets, Attribution groups, and Anomaly detection to analyze and monitor your Snowflake cost and usage.

Snowflake data in Cloud Analytics

Standard dimensions

You can get Snowflake data through the standard Cloud Analytics dimensions. See below for the mapping between the DoiT Cloud Analytics and Snowflake terminologies:

DoiT termSnowflake termSnowflake definition
Billing account IDORGANIZATION_NAMEThe name of the organization.
CostUSAGE_IN_CURRENCYThe total amount charged for the USAGE_TYPE for USAGE on the USAGE_DATE.
Cost typeBALANCE_SOURCEThe source of the funds used to pay for the daily usage. See possible values of BALANCE_SOURCE.
Project IDACCOUNT_NAMEThe name of the account where the usage occurs.
Service IDSERVICE_TYPEThe type of usage. See possible values of SERVICE_TYPE.
SKURATING_TYPEIndicates how the usage in the record is rated or priced. Possible values: compute, data_transfer, storage, other.
UnitUSAGEThe total amount of usage charged based on SERVICE_TYPE.
UsageBILLING_TYPEIndicates what is being charged or credited. See possible values of BILLING_TYPE.

Possible values of BALANCE_SOURCE

  • capacity: Usage paid with credits remaining on an organization's capacity commitment.

  • free usage: Usage covered by the free credits provided to the organization.

  • overage: Usage that was paid at on-demand pricing, which occurs when an organization has exhausted its capacity, rollover, and free credits.

  • rebate: Usage covered by the credits awarded to the organization when it shared data with another organization.

  • rollover: Usage paid with rollover credits. When an organization renews a capacity commitment, unused credits are added to the balance of the new contract as rollover credits.

Possible values of SERVICE_TYPE

  • automatic_clustering: Refers to automatic clustering.

  • cloud_services: Refers to cloud service credit usage.

  • data_transfer: Refers to Understanding data transfer cost.

  • logging: Refers to Logging and Tracing Overview.

  • materialized_view: Refers to Working with Materialized Views.

  • query_acceleration: Refers to Using the Query Acceleration Service.

  • replication: Refers to Introduction to replication and failover across multiple accounts.

  • search_optimization: Refers to Search Optimization Service.

  • serverless_task: Refers to Introduction to tasks.

  • snowpipe: Refers to Snowpipe.

  • snowpipe_streaming: Refers to Snowpipe Streaming.

  • storage: Refers to Understanding storage cost.

  • warehouse_metering: Refers to Virtual warehouse credit usage. Does not indicate usage of serverless or cloud services compute.

Possible values of BILLING_TYPE

  • consumption: Usage associated with compute credits, storage costs, and data transfer costs.

  • priority support: Charges for priority support services. This charge is associated with a stipulation in a contract, not with an account.

  • rebate: Usage covered by the credits awarded to the organization when it shared data with another organization.

  • support_credit: Snowflake Support credited the account to reverse charges attributed to an issue in Snowflake.

  • vps_deployment_fee: Charges for a Virtual Private Snowflake deployment.

System labels

Below are the Snowflake system labels that you can use in Cloud Analytics.

  • snowflake/database_id: The ID of a Snowflake database.

  • snowflake/database_name: The name of a Snowflake database.

  • snowflake/query_hash: A cryptographic hash of the query text, used for identification and grouping.

  • snowflake/query_parameterized_hash: A cryptographic hash of the query text after parameterization, used for identification and grouping.

  • snowflake/service_level: The level of service associated with the Snowflake warehouse, such as Standard or Enterprise.

  • snowflake/user_name: The name of the user who executed the query.

  • snowflake/warehouse_credit_cloud_services_rate: The cost per warehouse credit for cloud services, such as storage or networking.

  • snowflake/warehouse_credit_compute_rate: The cost per warehouse credit for compute resources.

  • snowflake/warehouse_id: The ID of a Snowflake warehouse.

  • snowflake/warehouse_name: The name of a Snowflake warehouse.

QUERY_TAG

DoiT supports Snowflake's QUERY_TAG. Such tags appear under Lables in Cloud Analytics.

Extended metrics

Query Cost

The Query Cost metric quantifies an estimate for the amount of resources consumed by a specific query in the Snowflake warehouse. It estimates the computational expense associated with executing a query based on its runtime.

Compute cost is split proportionally against all queries that run against that warehouse, based on their timeshare of the warehouse uptime. For example, if a query runs for 15 seconds over a full hour of warehouse availability, it's recorded as consuming the equivalent of the full hour of compute resources. If the warehouse remains idle for an hour without any active queries, there will be no associated compute costs.

The Query Cost metric is intended solely for profiling queries and understanding resource usage. It does not directly translate into actual costs incurred and should not be used as a financial metric.

See the Top 10 Users by Query Cost widget for an example application of this metric.

Example reports

This section provides example reports that demonstrate how to work with Snowflake data in Cloud Analytics. You can combine the stand dimensions and metrics with Snowflake query tags to create reports.

Overall cloud spend

This example shows an organization's cloud costs in the last few months.

  • Group by: Provider

Snowflake data report

DOIT_WAREHOUSE cost

This example shows the costs in the last few months incurred by the DOIT_WAREHOUSE, a warehouse created by DoiT on your behalf.

  • Group by: snowflake/warehouse_name

  • Filters: snowflake/warehouse_name equals DOIT_WAREHOUSE

DOIT_WAREHOUSE cost per month