Exporting Your Google Cloud Billing Data to BigQuery
Exporting your Cloud Billing data to BigQuery is a powerful way to analyze your Google Cloud usage, costs, and pricing information in a scalable, queryable format.
This process automatically sends detailed billing data to a BigQuery dataset, enabling advanced analytics, reporting, and visualization with tools like Looker Studio or custom SQL queries.
In this article, we’ll cover the standard export for usage and cost data, with a note on the separate pricing data export.
You can check out the official Google Cloud documentation as of September 2025.
Introduction
Google Cloud offers multiple types of billing exports to BigQuery:
- Standard usage cost data: Includes high-level details like services, SKUs, projects, labels, costs, usage, credits, and currency.
- Detailed usage cost data: Adds resource-level granularity (e.g., for Compute Engine VMs or GKE clusters).
- Pricing data export: A separate export focused on SKU pricing structures, tiers, and contract details (not retroactive; data starts from enablement date). This uses a dedicated table named cloud_pricing_export and has its own schema for fields like list_price, tiered_rates, and consumption_model_prices.
- Other specialized exports: Re-billing (for resellers) and Committed Use Discounts (CUD) metadata (in preview).
Exporting billing data helps with cost optimization, forecasting, and compliance.
Note that while standard exports can backfill data (up to the previous month in multi-region datasets), pricing exports do not. There are no direct costs for loading data into BigQuery, but standard BigQuery storage and query fees apply.
Prerequisites
Before starting:
- A Google Cloud Billing account linked to your projects.
- Billing Admin or equivalent permissions to manage exports.
- A Google Cloud project with BigQuery enabled.
- Enable the BigQuery API in your project (via the Google Cloud console or gcloud services enable bigquery.googleapis.com).
- Familiarity with BigQuery datasets and tables.
For pricing data export specifically, ensure your billing account is configured for local currency if needed, as prices include conversions.
Step 1: Create a BigQuery Dataset
- Go to the BigQuery console.
- Select or create a project.
- Click Create dataset.
4. Enter a Dataset ID (e.g., billing_export).
5. Choose a location:
- Multi-region: US or EU (recommended for backfill of retroactive data from the current and previous month).
- Region: Select from supported locations like us-central1, europe-west4, or asia-southeast1 (data starts from export enablement; no backfill).
6. Set encryption to Google-managed keys.
7. Click Create dataset.
Note: Dataset location cannot be changed later. For pricing exports, any supported location works, but align it with your usage data dataset for easier joins.
Step 2: Enable the Billing Export
- Go to the Cloud Billing console.
- Select your billing account.
- Navigate to Billing export in the left menu.
4. Under BigQuery export, choose the export type:
- Enable Standard usage cost and/or Detailed usage cost.
- Select your project and dataset.
- Click Save.
- For pricing data: Enable Pricing separately — it creates the cloud_pricing_export table automatically. After clicking Edit settings for the Pricing export option, you’ll see a configuration screen like this:
- Click Save.
The export starts immediately. Initial data population:
- Standard exports: Backfill may take up to 5 days for multi-region datasets.
- Pricing exports: Data is generated daily and starts from the enablement date (no backfill).
Step 3: Verify the Export
- In BigQuery, navigate to your dataset.
- Check for auto-created tables:
- Standard: gcp_billing_export_v1_billing_account_id .
- Detailed: gcp_billing_export_resource_v1_billing_account_id.
- Pricing: cloud_pricing_export.
3. Run a sample query to verify data:
SELECT sku.id, sku.description, list_price.*
FROM `your-project.your-dataset.cloud_pricing_export`
WHERE sku.id = '2DA5-55D3-E679' LIMIT 1;When to Export Usage vs Pricing (or Both)
To make the most of your billing data, exporting both usage and pricing data together is often best. Here’s why:
- Usage data tells you what was consumed.
- Pricing data tells you how much each unit costs, tiered rates, geo variations, etc.
- When you join usage with pricing you can compute actual spent vs list, see discount impacts, compute effective unit prices, and build more accurate cost models.
If you only export usage, you might be blind to pricing structure (tiers, geo, discounts). If you only export pricing, you won’t know what your usage patterns are.
Best Practices
- Use multi-region datasets for comprehensive historical analysis.
- Combine usage and pricing exports in the same dataset for cost calculations (e.g., join on SKU ID).
- Monitor BigQuery costs: Use partitioned tables and optimize queries.
- Automate reports with Scheduled Queries or integrate with Looker Studio.
- For security: Use IAM roles to restrict access to the dataset.
By exporting to BigQuery, you gain granular insights into your spending, enabling better cost management.

