google_bigquery_job cost estimation
A BigQuery job is free to submit. A query job bills per TiB of data scanned under on-demand pricing; load, copy, and export jobs are free. Bytes scanned is the cost.
A google_bigquery_job runs a unit of work in BigQuery: a query, a load, an export (extract), or a copy. Submitting a job carries no charge; what a job costs depends entirely on its type. Load, copy, and export jobs are free (you pay only for the resulting storage and any egress on exports). Query jobs are where cost lands.
Under the on-demand model, a query job bills per TiB of data scanned, and BigQuery scans only the columns and partitions the query actually reads. A SELECT * over an unpartitioned table scans everything and bills for it; the same query restricted to needed columns with a partition filter can scan a tiny fraction. This is why query cost is a property of how the SQL is written and how the underlying tables are partitioned, not of the job object. Under the capacity (slot reservation) model, queries draw on pre-purchased slots instead of per-TiB scanning, which suits steady high-volume workloads.
A useful guardrail: setting maximum_bytes_billed on a query job caps the scan and fails a query that would exceed it, preventing a runaway SELECT from scanning terabytes unexpectedly. c3x prices query jobs by estimated bytes scanned (or slot usage under capacity pricing) and treats load, copy, and export jobs as free apart from their storage and egress effects.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "google_bigquery_job" "daily_rollup" {
job_id = "daily-rollup-${formatdate("YYYYMMDD", timestamp())}"
query {
query = "SELECT user_id, COUNT(*) AS events FROM analytics.events WHERE event_time >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 DAY) GROUP BY user_id"
maximum_bytes_billed = 10737418240
destination_table {
dataset_id = google_bigquery_dataset.analytics.dataset_id
table_id = "daily_user_events"
}
}
}Pricing dimensions
What you actually pay for when you provision google_bigquery_job.
| Dimension | Unit | What's being charged |
|---|---|---|
| Job submission | free | Submitting a job has no charge. Load, copy, and export jobs are free apart from resulting storage and egress. $0 |
| Query bytes scanned (on-demand) | per TiB | A query job bills per TiB scanned, reading only the columns and partitions the query touches. ~$6.25/TiB scanned |
| Slot usage (capacity pricing) | per slot-hour | Under reservations, queries draw on pre-purchased slots instead of per-TiB scanning. Editions from ~$0.04/slot-hour |
Optimization tips
Common ways to reduce google_bigquery_job cost without changing the workload.
Select only the columns you need
Proportional to columns droppedBigQuery is columnar and bills by bytes scanned. Replacing SELECT * with the specific columns needed cuts scanned bytes and on-demand query cost directly.
Filter on the partition column
Often 90%+ less scannedA WHERE clause on the table's partition field lets BigQuery prune to matching partitions, so the job scans a fraction of the data instead of the whole table.
Cap runaway queries with maximum_bytes_billed
Setting maximum_bytes_billed fails a query that would scan more than the cap, preventing an accidental full-table scan from billing for terabytes.
FAQ
Does a BigQuery job cost money?
Only query jobs, under on-demand pricing, billed per TiB scanned. Load, copy, and export jobs are free (you pay only for resulting storage and export egress). Submitting a job is free.
How do I control BigQuery query job cost?
Reduce bytes scanned: select only needed columns, filter on the partition column, and set maximum_bytes_billed as a guardrail. Cost is a function of what the query scans.
On-demand or capacity pricing for jobs?
On-demand bills per TiB scanned and suits variable workloads. Capacity (slot reservations) bills for pre-purchased slots and suits steady high-volume querying. c3x can model either.
Related resources
Estimate this resource in your own Terraform
Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including google_bigquery_job.