Guides
Check your warehouse costs by hand
Each guide answers one question about BigQuery or Snowflake cost with SQL you can paste and run as it is, against the same query history views dwhat reads. Then it says what doing it by hand leaves out.
- Find your most expensive BigQuery queries with SQLBigQuery · Copy-paste SQL that lists the BigQuery queries that cost the most over the last 30 days, from INFORMATION_SCHEMA.JOBS_BY_PROJECT, with bytes billed, slot hours and estimated cost.
- Snowflake cost per user and per query, with SQLSnowflake · Copy-paste SQL for Snowflake credits by user and by query from QUERY_ATTRIBUTION_HISTORY, and idle warehouse time from WAREHOUSE_METERING_HISTORY.
- Cost per dbt model on BigQuery and SnowflakeBigQuery and Snowflake · SQL that attributes BigQuery and Snowflake compute cost to dbt models, using the node_id in dbt's default query comment and dbt-bigquery's job labels.
- Why did my BigQuery or Snowflake bill go up?BigQuery and Snowflake · Find the day warehouse cost jumped against a 14-day median, then the users and dbt models that grew that day. Copy-paste SQL for BigQuery and Snowflake.
- Fixes for expensive BigQuery and Snowflake queries, and how to tell which appliesBigQuery and Snowflake · Seven fixes BigQuery, Snowflake and dbt document — full scans, SELECT *, LIMIT, spilling, pruning, dbt full rebuilds, repeated queries — each with SQL that finds the queries it applies to.
Rather have it every day?
dwhat runs these for you each day, keeps the history, and emails you when a day costs much more than usual.