Free tool · BigQuery on-demand
Audit a BigQuery CSV export, privately, in your browser
Run one query on your project's job history, save the result as CSV and choose the file below. This page works out the last 30 days of on-demand compute cost by user, dbt model and dashboard, the days that spiked, and the 20 most expensive queries with fix hints — without an account, a credential, or the file leaving your computer.
Nothing is uploaded. The file is read by this page's own JavaScript and the audit is drawn in the page; there is no request that sends it anywhere, which your browser's network tab will confirm. Close the tab and it is gone. dwhat counts visits to this page and nothing else.
What it prices, and what it does not
- BigQuery on-demand compute only: each job's
total_bytes_billedat a price per TiB:6.25 USD by default, the on-demand list price in the US multi-region. Other regions and contracts differ; type yours below. - Not reservations. A project on BigQuery editions pays for slot capacity, not per query, so jobs that ran on a reservation are left out and counted, never given a price. If most of your jobs ran on one, this is not the tool for your bill. Weighing a move to capacity? Put both prices side by side with theon-demand vs capacity break-even worksheet.
- Not storage, streaming inserts or data transfer, which are billed separately.
1. Export the job history
Export query
SELECT
job_id,
FORMAT_TIMESTAMP('%Y-%m-%dT%H:%M:%E3SZ', creation_time) AS creation_time,
user_email,
statement_type,
SUBSTR(query, 1, 20000) AS query,
TO_JSON_STRING(labels) AS labels,
total_bytes_billed,
total_bytes_processed,
total_slot_ms,
TIMESTAMP_DIFF(end_time, start_time, MILLISECOND) AS elapsed_ms,
cache_hit,
reservation_id
FROM `region-us`.INFORMATION_SCHEMA.JOBS_BY_PROJECT
WHERE creation_time >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY)
AND job_type = 'QUERY' AND state = 'DONE'
AND IFNULL(statement_type, '') != 'SCRIPT'
AND (IFNULL(total_bytes_billed, 0) > 0 OR IFNULL(total_slot_ms, 0) > 0)- Run it in the BigQuery console, in that project. It reads
INFORMATION_SCHEMA.JOBS_BY_PROJECT, which needs a role withbigquery.jobs.listAllon the project, such as BigQuery Resource Viewer. It is a query like any other, billed to the project. - Under the results, choose Save results and then CSV. If the console says the result is too large for a local file, save it to Google Drive as CSV and download it from there.
- One project and one region per export. Run it again for another region.
2. Choose the file
An export made with the query on /audit works too, but it has no reservation_id column.
Keep it up to date
This is one export, one time. Connected with a read-only account, dwhat reads the history every few hours, works for Snowflake too, emails you when a day costs much more than usual, and builds a monthly report for finance.