Free tool · BigQuery on-demand
BigQuery cost across several projects: a SQL generator
When the bill goes up and your jobs run in more than one project, list the projects and get one query that shows bytes billed and estimated on-demand cost for each, day by day.
1. Name the projects and the region
2. Copy the query and run it
Run it in the BigQuery console from any project you can run queries in. To read another project's job history you need permission to list everybody's jobs there (bigquery.jobs.listAll, which BigQuery Resource Viewer grants); a project you cannot read makes the whole query fail with an access error, so remove it and run again. Each region is a separate query: INFORMATION_SCHEMA views are regional.
Google's documentation: JOBS view. If you have access to the whole organisation, JOBS_BY_ORGANIZATION covers every project in one view; this generator is for when you can name the projects.
What the query counts, and what it leaves out
- BigQuery on-demand query processing only, priced per TiB billed (2^40 bytes) at the rate entered here. The prefilled rate is an example, not a current price for your region or contract.
- Counted: finished query jobs that billed bytes or slot time. A script's parent job is left out, because the statements inside it are counted on their own.
- Jobs that ran on a reservation (BigQuery editions) are billed by slot capacity, not by bytes: the query counts them per day and project, and does not price them.
- Not included: the free tier, discounts and committed-use agreements, storage, data transfer and other services.
- One region per query: INFORMATION_SCHEMA views are regional. Run it again for each region your projects use.
- Days are UTC. Today is left out, because it is not over.
- An estimate from job metadata, not an invoice.
Then find out who and what spent it
This query says which project and which day. A free audit of a project's job history says which user, dbt model and dashboard, and which queries cost the most, with fixes the SQL shows evidence for.
Related guides
- Why did my BigQuery or Snowflake bill go up?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.
- Find your most expensive BigQuery queries with SQLCopy-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.