Stay organized with collections Save and categorize content based on your preferences.
This document provides reference information for the schema of the Cloud Billing data that's exported to each table in BigQuery.
Billing data tablesShortly after enabling Cloud Billing export to BigQuery, billing data tables are automatically created in the BigQuery dataset.
gcp_billing_export_v1_<BILLING_ACCOUNT_ID>
.gcp_billing_export_resource_v1_<BILLING_ACCOUNT_ID>
.cloud_pricing_export
.cud_subscriptions_export
.If you want to consolidate billing data from past configurations or versions of Cloud Billing export to BigQuery, we recommend keeping the data in separate tables and using a UNION query instead.
Frequency of data loads Standard and detailed usage cost exportFor customers who enable the standard or detailed usage cost data export for the first time:
If you configure your BigQuery dataset to use a multi-region location (EU or US), Cloud Billing data is exported retroactively from the start of the previous month. For example, if you enable standard usage cost or detailed usage cost data export on September 23rd, your export will include data beginning August 1st.
We export data in chronological order, one day at a time, so the data from the first day of the last month is populated first. For the initial backfill of exported data, it might take up to five days for your retroactive Cloud Billing data to finish exporting before you start seeing your most recent usage data.
If you configure your BigQuery dataset to use a supported region location, your standard usage cost or detailed usage cost data is available from the date you enable Cloud Billing export, and after. That is, Google Cloud billing data is not added retroactively for non-multi-region dataset locations, so you won't see Cloud Billing data from before you enable export.
For customers who have enabled, disabled, and subsequently re-enabled the standard usage cost or detailed usage cost data export, the Cloud Billing data might not be available for the period when export was explicitly disabled.
If you enable the pricing data export, your BigQuery dataset only reflects Cloud Billing data incurred from the date when you first enabled the pricing export, and after. Cloud Billing pricing data isn't added retroactively, so you won't see pricing data for dates that occurred before you enabled export.
The data in the BigQuery datasets reflects the state of your resources at the time that the usage was recorded. If you make changes to your resources, such as adding new labels to a project, or changing a project's hierarchy (which would change project.ancestors
), those changes are only shown in future exports of usage data. Previously exported records aren't changed.
If you delete any exported data (such as BigQuery export records), we can't backfill the deleted records.
If you edit the settings of an export to update the project or dataset where your exported billing data is stored, data from the previous dataset isn't automatically backfilled into the new dataset; the new BigQuery dataset only reflects Cloud Billing data incurred from the date when you changed the export settings, and after. To include the complete record of exported billing data, you must manually join the new dataset with the previous dataset. For more information, see Join operation.
BigQuery loads are ACID compliant, so if you query the BigQuery Cloud Billing export dataset while data is being loaded into it, you won't encounter partially loaded data.
See other limitations that might impact exporting your billing data to BigQuery, such as datasets with customer-managed encryption keys (CMEK) enabled.
Exporting Cloud Billing data to BigQuery is subject to the following limitations.
When the table schema changes, such as when new fields are added to a BigQuery table schema for a Cloud Billing data export, any queries that directly reference the exported columns might fail. To resolve this, we recommend creating BigQuery views that query the exported tables and present the information in your preferred structure.
You can then adjust the queries that feed your reports and dashboards to pull from the views, instead of the exported tables. By using views, you can standardize the structure of the data used in your queries and dashboards.
The views you create should normalize the data so that all of the relevant tables present the same schema to your queries. This protects you from future schema changes, allowing you to modify the view's underlying query in those instances when the data schema changes.
BigQuery datasets are configured to use a location – either a multi-region location (EU or US), or a region location. The dataset location is set at creation time. After a dataset is created, its location can't be changed.
Cloud Billing data export supports all multi-region locations (EU or US), but only a subset of region locations. When you're configuring your Cloud Billing export settings, if you create or select a dataset that's configured to use an unsupported region location, when you attempt to save your export settings, you'll see an Invalid dataset region error.
The following table lists the multi-region locations and the region locations that are supported for use with BigQuery datasets that contain Cloud Billing data.
Americas Asia Pacific EuropeMulti-region: US
Regions:
Regions:
Multi-region: EU
Regions:
If you edit your export settings to update the project or dataset where your exported billing data is stored, previously exported billing data isn't backfilled to your new dataset. To include the billing information that was exported prior to the switch, you must manually join the new dataset with the previous dataset. For more information, see Join operation.
For your BigQuery datasets containing standard usage cost data or detailed usage cost data, the type of location you configure on the dataset impacts the timing of when your Google Cloud billing data is exported to the dataset:
If your dataset is configured to use a supported region location, your standard usage cost data and your detailed usage cost data only reflect Google Cloud billing data incurred starting from the date you enabled Cloud Billing export, and after. That is, Google Cloud billing data is not added retroactively for non-multi-region dataset locations, so you won't see Cloud Billing data from before you enable export.
Note: Cloud Billing data export supports all multi-region locations (EU or US), and a subset of region locations. When you're configuring your Cloud Billing export settings, if you create or select a dataset that's configured to use an unsupported region location, when you attempt to save your export settings, you'll see an Invalid dataset region error.For more details, see Data availability.
Your BigQuery datasets containing pricing data only collect Google Cloud billing data incurred from the date you set up Cloud Billing export, and after. That is, _Google Cloud pricing data isn't added retroactively, so you won't see Cloud Billing pricing data from before you enable export. For more details, see Data availability.
When exporting detailed usage cost data, the detailed export automatically includes resource-level information about Compute Engine. To view a breakdown of Google Kubernetes Engine (GKE) cluster costs in a detailed data export, you must also enable cost allocation for GKE.
Dataset encryption: Customer-managed encryption keys (CMEK) aren't supported when exporting billing data to BigQuery. If you enable CMEK encryption for your billing data dataset, this type of encryption prevents Cloud Billing from writing billing data to the appropriate tables within that dataset. Instead, you need to enable the dataset to use a Google-owned and Google-managed encryption key.
If you want to use BigQuery row-level security on the table that contains your exported data, you must give the Cloud Billing export service account billing-export-bigquery@system.gserviceaccount.com
full access to the table using the BigQuery TRUE
filter. The following command grants access to the Cloud Billing service account:
CREATE ROW ACCESS POLICY cloud_billing_export_policy
ON `__project_id__.__dataset_id__.__table_id__`
GRANT TO ('serviceAccount:billing-export-bigquery@system.gserviceaccount.com')
FILTER USING (TRUE);
Resource-level Tags might take up to an hour to propagate to BigQuery exports. If a tag was added or removed within an hour, or if a resource has existed for less than an hour, it might not appear in the export.
Resource-level tags are available for the following resources:
If you use VPC Service Controls, your BigQuery exports might be blocked. To resolve, you need to manually exempt VPC.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["This document provides schema reference information for Cloud Billing data that is exported to BigQuery tables, which are automatically created upon enabling the export feature."],["There are three types of billing data tables: standard usage cost (`gcp_billing_export_v1_\u003cBILLING_ACCOUNT_ID\u003e`), detailed usage cost (`gcp_billing_export_resource_v1_\u003cBILLING_ACCOUNT_ID\u003e`), and pricing data (`cloud_pricing_export`)."],["The initial data export can take several hours to 48 hours, depending on whether it's standard/detailed usage or pricing data, and if configured to include retroactive data, it may take up to five days to fully populate."],["Cloud Billing data exports support multi-region locations (EU or US) retroactively from the start of the previous month, while region locations are only available from the date the export is enabled, with certain limitations and restrictions listed."],["Modifying the automatically generated tables can cause data export issues, and Customer-Managed Encryption Keys (CMEK) are not supported for billing data datasets, requiring the use of Google-owned encryption keys instead."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4