snowflake_billing_warehouse_credits_used
Total credits billed for warehouse computeAbout this metric
The snowflake_billing_warehouse_credits_used metric measures the cumulative number of Snowflake credits consumed by virtual warehouses for compute operations. As a counter-type metric, it continuously increments to track the total credit expenditure across warehouse usage, which directly translates to cloud infrastructure costs. This metric is fundamental to understanding Snowflake's consumption-based pricing model, where virtual warehouses consume credits based on their size and the time they remain active. Each credit represents a specific amount of computational resources, and monitoring this metric provides visibility into the primary cost driver for most Snowflake deployments. Organizations can track credits used per warehouse, enabling granular cost attribution across different workloads, teams, or applications.
From an operational perspective, this metric is critical for cost management, capacity planning, and identifying inefficiencies in warehouse utilization. By analyzing credit consumption patterns, teams can detect anomalies such as warehouses left running idle, oversized warehouses for light workloads, or unexpected spikes in query processing that drive up costs. The metric should be monitored alongside warehouse uptime and query patterns to calculate effective cost per query or cost per hour. According to Snowflake's resource monitoring documentation, establishing resource monitors with credit quotas can help prevent budget overruns. Healthy patterns typically show predictable credit consumption aligned with business hours and known workload schedules, with minimal credit usage during non-peak periods when automated warehouse suspension should be in effect.
Common alerting use cases include setting thresholds for unexpected credit consumption rates (credits per hour exceeding baseline), detecting warehouses consuming disproportionate credits relative to their expected workload, and triggering notifications when approaching monthly or quarterly credit budgets. For troubleshooting, sudden increases in this metric often indicate runaway queries, missing warehouse auto-suspend configurations, or newly deployed workloads requiring optimization. Teams should correlate spikes with the WAREHOUSE_METERING_HISTORY view in Snowflake's Account Usage schema to identify specific warehouses and time periods driving cost increases, enabling targeted investigation and remediation.
Technical Annotations (63)
Configuration Parameters (11)
AUTO_RESUMErecommended: TRUEAUTO_SUSPENDrecommended: 60VALIDATION_MODErecommended: RETURN_ERRORS or RETURN_10_ROWSSCHEDULErecommended: 1 daydaily_creditsrecommended: 500auto_suspendrecommended: based on actual usage patternswarehouse_sizerecommended: X-Smallauto_suspend_timeoutrecommended: 0 for ETL, 600 for BI, 300 for DevOpsSTATEMENT_TIMEOUT_IN_SECONDSrecommended: 3600STATEMENT_QUEUED_TIMEOUT_IN_SECONDSrecommended: varies by workloadMIN_CLUSTER_COUNTrecommended: 1Error Signatures (2)
090105error codeCannot Perform Operation. Warehouse Suspendedlog patternCLI Commands (10)
ALTER WAREHOUSE my_warehouse RESUME;remediationSHOW WAREHOUSES;diagnosticALTER WAREHOUSE my_warehouse SET AUTO_RESUME = TRUE;remediationCOPY INTO customers FROM @my_stage/customers.csv FILE_FORMAT = (TYPE = CSV) VALIDATION_MODE = 'RETURN_10_ROWS'diagnosticCOPY INTO customers FROM @my_stage/customers.csv FILE_FORMAT = (TYPE = CSV) VALIDATION_MODE = 'RETURN_ERRORS'diagnosticCREATE OR REPLACE ALERT load_failure_alert WAREHOUSE = monitoring_wh SCHEDULE = '5 MINUTE' IF (EXISTS (SELECT 1 FROM SNOWFLAKE.ACCOUNT_USAGE.COPY_HISTORY WHERE START_TIME >= DATEADD(MINUTE, -10, CURRENT_TIMESTAMP()) AND STATUS = 'Partially Loaded' AND ERROR_COUNT > 0)) THEN CALL send_slack_alert('Data load failures detected!')monitoringselect sum(credits_used) from account_usage.metering_historymonitoringALTER WAREHOUSE LOAD_WH SET STATEMENT_TIMEOUT_IN_SECONDS= 3600;remediationSHOW PARAMETERS IN WAREHOUSE LOAD_WH;diagnosticALTER WAREHOUSE your_warehouse_name SET MIN_CLUSTER_COUNT = 1;remediationTechnical References (40)
virtual warehousecomponentCOPY_HISTORYcomponentwarehouse creditsconceptWAREHOUSE_METERING_HISTORYcomponentACCOUNT_USAGEcomponentACCOUNT_USAGE schemacomponentSnowsightcomponentWAREHOUSE_METERING_HISTORY viewcomponentResource MonitorscomponentACCOUNTADMINcomponentwarehouse_credit_usagecomponentvirtual warehousescomponentauto-scalingcomponentauto-suspensioncomponentcredit consumptionconceptwarehouse sizeconceptcredit consumption rateconceptBI dashboardconceptrefresh frequencyconceptauto-suspendcomponentbilling minimumconceptwarehouse size (X-Small, Small, Medium, Large)componentmulti-cluster warehousescomponentwarehouse cacheconceptdata cachesconceptETL/ELT warehousescomponentBI warehousescomponentfrozen clustercomponentresource monitorscomponentwarehousecomponentconcurrency scalingcomponentmulti-clustercomponentmulti-cluster warehousecomponentcompute creditsconceptQUERY_HISTORYcomponentRELATIVE_PERFORMANCE_COSTconceptWAREHOUSE_SIZEcomponentCOST_PER_QUERYconceptX-Small warehousecomponentquery historycomponent