BigQuery cost reporting
Know exactly what your BigQuery bill is made of.
You get one number at the end of the month โ a total. Costline opens it up, from your own machine: who spent what, on which datasets, tables and queries, and what is likely to surprise you next.
The bill tells you how much. Never why.
By the time the invoice lands, the query that caused it ran three weeks ago and nobody remembers whose dashboard triggered it.
Who?
Which person, team or service account drove the increase โ not just the project total.
Where?
The datasets and tables that actually cost the most, ranked, with the owners attached.
Which query?
The individual queries responsible, grouped with literals and comments stripped out.
What next?
The patterns that tend to blow up โ full scans, unpartitioned reads, repeat offenders.
What it produces
- Cost by user and service account
- Cost by dataset and table
- Top queries by cost, de-duplicated
- Estimated on-demand cost at the published per-TiB rate
- A clean PDF report you can send to finance
- Machine-readable JSON for your own pipeline
- Waste flags โ
SELECT *, missing partition filters, repeated queries - Storage economics โ logical vs physical, and where it is going
- dbt model attribution โ which models cost the most
- Daily trends and spike detection โ who caused the jump
- A local dashboard for browsing the same data interactively
- Read-only guarantee:
SELECT/WITHonly, enforced in code
Three steps. No agent, no server, no sign-up.
-
1
Make a read-only key
Create a Google service account with
roles/bigquery.metadataViewerandroles/bigquery.jobUser. That is the whole permission ask โ it cannot read your table data. -
2
Run one command
Drop the key in
secrets/and double-click the runner โ ordocker runit yourself. Docker or Python 3.11+, nothing else. -
3
Read the report
A PDF and JSON land in
output/. Send them to whoever owns the bill.
docker build -t bq-cost-report .
docker run --rm \
-v "$(pwd)/secrets:/app/secrets" \
-v "$(pwd)/output:/app/output" \
bq-cost-report --project YOUR_PROJECT_ID
Read one first
A complete report, generated from built-in demo data โ so nothing in it is real, and it is safe to forward to anyone. Every section, every finding and the exact layout you would get. You can reproduce it yourself with a single command, before this tool ever touches a project.
BigQuery cost report โ sampleSynthetic data ยท 27,076 jobs ยท $264 ยท opens in a new tab
Free, and a one-time licence when you want more
Community
โฌ0
MIT licensed. Forever.
- Cost by user, dataset, table and query
- PDF + JSON report
- Read-only, self-hosted
- One dataset per run
Costline Full
โฌ99 one-time
Perpetual licence. No subscription.
- Whole project, or any datasets you pick
- Waste and surprise-bill risk flags
- Storage economics, logical vs physical
- dbt model attribution
- Daily trends and spike detection
- Local dashboard (no CLI)
One-time licence per project. Self-hosted, same guarantees as the free edition. Larger or enterprise purchases with invoicing: get in touch.
Why you can actually run this
Read-only, enforced
A safety layer rejects anything that is not a plain SELECT or WITH
against INFORMATION_SCHEMA. No DDL, no DML, no CALL. Ever.
Metadata only
It reads how much each job scanned and who ran it โ never the contents of a table.
Nothing phones home
No telemetry, no account, no cloud service. The dashboard binds to your own
localhost.
That matters most where it is hardest to buy: regulated environments where shipping job metadata to a third-party platform is simply not an option.
Straight answers
Does my data leave my machine?
No. The tool runs locally against your own project with your own key. There is no backend, no telemetry, and the only network calls are the BigQuery API calls you authorised.
Why not just use Google's own cost tooling?
Google shows you project-level totals and let you explore jobs. What it does not do is turn that into a report that names the people, tables and queries responsible โ or tie spend back to a dbt model. That translation layer is the whole product.
How is this different from Vantage, CloudZero, Finout or DoiT?
Those are cloud-wide FinOps platforms, priced and scoped for finance and platform teams, and they generally require continuously exporting your billing data to a third party. Costline is the opposite: narrow, cheap, on your machine, and pointed at BigQuery specifically.
We are on BigQuery Editions / committed slots. Does it still work?
The on-demand view โ bytes scanned at the published per-TiB rate โ is fully covered today. If you are on slot-based or committed pricing, per-query cost attribution means something different, and the honest answer is that this is the piece we are building next. Tell us your setup and we will tell you straight whether the current release helps you.
Do I need Docker?
No. Docker is the recommended path because it needs no Python; you can also run it from source on Python 3.11+.
Is it safe to hand this a service-account key?
The key needs only two metadata permissions, which grant no access to table contents. The tool never writes anything, and the read-only constraint is enforced in code rather than promised in a README.
How do I buy the full edition?
Use the Buy the full edition button above โ you get the download and a licence key immediately. If you need an invoice, a purchase order, or a licence covering more than one project, email and we will sort it out directly.
Start with the free edition.
If it finds nothing worth fixing, you have lost twenty minutes.