Estimate what a query costs before you run it
This recipe tells you what already happened. The analyzer takes a query you have not run yet and estimates what it will scan, in your browser.
What discounts and credits am I actually receiving?
Credits broken out by type, which is how you verify a CUD is applying.
Costs money to run, queries your billing export tableReviewed against Google’s docs, 23 Oct 2026
Permissions. Needs read access to the dataset holding your billing export (BigQuery Data Viewer on that dataset); bigquery.jobs.create to run any query (BigQuery Job User has it).
SELECT
credit.type AS credit_type,
credit.full_name AS credit_name,
service.description AS service,
ROUND(SUM(credit.amount), 2) AS credit_amount,
ROUND(SUM(cost), 2) AS gross_cost
FROM `PROJECT.DATASET.gcp_billing_export_v1_XXXXXX_XXXXXX_XXXXXX`,
UNNEST(credits) AS credit
WHERE _PARTITIONTIME >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 35 DAY)
GROUP BY credit_type, credit_name, service
ORDER BY credit_amount;What it returns
- credit_type
- COMMITTED_USAGE_DISCOUNT, SUSTAINED_USAGE_DISCOUNT, PROMOTION, and so on.
- credit_amount
- Negative, credits reduce cost.
- gross_cost
- Cost of the usage rows that received this credit. A row with two credits is counted under both, so do not add this column up.
How to read it
- A committed-use discount that stops appearing is the most expensive silent failure in GCP billing. Check this monthly, not when the bill jumps.
- Sustained-use discounts apply automatically and need no action; committed-use ones were bought and can expire.
- Promotional credits mask real run-rate. If a large PROMOTION line is about to end, your forecast needs to account for it now.
Run this once, or have it run every day.
Finitizer evaluates this class of question continuously against your live BigQuery estate, tracks how each number moves between runs, and turns findings into assigned tasks. Read-only and keyless.
See how Finitizer works