How to Export Google Cloud Billing Data to BigQuery
Choose a Cloud Billing export type and configure BigQuery. Check permissions, historical coverage, delays, query costs, and schema changes.
Google Cloud Billing export sends usage and cost data to BigQuery for SQL analysis. Standard export suits broad trends; detailed export adds VM- or SSD-level costs. History is not always backfilled, and BigQuery storage and queries can cost money, so choose the export type and dataset location first.
Select the data
Standard data includes invoice month, service, SKU, project, labels, location, cost, usage, credits, and adjustments. Detailed data adds resource-level information but can increase rows and query costs; GKE cost breakdown also requires GKE cost allocation. Pricing export contains rate metadata and is not backfilled. FOCUS and CUD metadata were marked Preview in docs checked 2026-11-18; confirm current availability.
Prepare and enable
You need Billing Account Costs Manager or Administrator on the source account and BigQuery User on the destination project. The project must have billing enabled and link to the same account. Create a BigQuery dataset in a supported location first; its location cannot be changed later. Pricing export also requires BigQuery Data Transfer Service API.
In Google Cloud Console, open Billing, then Billing export. Select the billing account and BigQuery export tab. Enable each needed type separately, select the project and dataset, then save. Google adds managed service accounts to write the data; do not remove them or tables may stop updating.
History and delays
The first standard, detailed, or FOCUS load can take hours. First-time use of an EU or US multi-region dataset can backfill from the start of the prior month and take up to five days. A supported single-region dataset contains only data from the enablement date. Pricing data is not backfilled and may take 48 hours to appear. Disabling and re-enabling can leave a gap; changing projects or datasets does not copy old data. Reports can lag by over 24 hours, so export is not real-time alerting.
Verify and analyze
Tables are created automatically. Standard is named gcp_billing_export_v1_BILLING_ACCOUNT_ID; detailed is gcp_billing_export_resource_v1_BILLING_ACCOUNT_ID. Check that recent rows arrive. The invoice.month field is invoice month, which can differ from usage month; credits and late adjustments affect reconciliation. Schemas can change, so normalize columns in BigQuery views and connect dashboards to the views. Detailed exports and queries can increase costs; inspect processed bytes.
Sources: Export overview, Setup and permissions, Standard schema, Detailed schema. Checked 2026-11-18; requirements can change.
SELECT invoice.month AS invoice_month, service.description AS service,
SUM(cost) AS cost_before_credits,
SUM(IFNULL((SELECT SUM(c.amount) FROM UNNEST(credits) AS c), 0)) AS credits
FROM `PROJECT_ID.DATASET_ID.gcp_billing_export_v1_BILLING_ACCOUNT_ID`
WHERE invoice.month BETWEEN '202610' AND '202611'
GROUP BY invoice_month, service
ORDER BY invoice_month, cost_before_credits DESC;