Structure of CUD metadata export Stay organized with collections Save and categorize content based on your preferences.
Preview
This product or feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of theService Specific Terms. Pre-GA products and features are available "as is" and might have limited support. For more information, see thelaunch stage descriptions.
This document provides reference information for the schema ofCloud Billing committed use discount (CUD) metadata that's exporteddaily to each table in BigQuery. This export provides a dailysnapshot of yourspend-based CUDscommitment metadata to a BigQuery table,which you can join with other billing data exports for better CUD managementand reporting.
Ingress and egress rules
If you useVPC Service Controlsfor BigQuery resources on your project or organization, you mustcreate ingress and egress rules to properly enable data exports to BigQuery.
- Create aningress rule that gives the individual access to create the export:
- ingressFrom: identities: -PRINCIPAL_IDENTIFIER_OF_USER_INITIATING_EXPORT sources: - accessLevel: "*" ingressTo: roles: - roles/bigquery.dataOwner resources: - projects/YOUR_PROJECT_ID_TO_HOST_EXPORT_DATA title: 'Ingress Rule Name'SeePrincipal identifiers for more information about principal identifier formats.
- Create anegress rule to allow Google Cloud access to the BigQuery dataset through VPC Service Controls:
- egressTo: roles: - roles/bigquery.dataOwner resources: - projects/132468967293 egressFrom: identityType: ANY_IDENTITY sources: - accessLevel: "*" sourceRestriction: RESTRICTION_STATUS title: 'Egress Rule Name'Note: If you skip this step, you will receive the following error when you attempt to initiate the export:You don't have permissions to enable the dataset.
Schema of the CUD export data
In your BigQuery dataset, your Cloud Billing accountCUD data is loaded into a data table namedcud_subscriptions_export.
The following information describes the schema of the data that's exported toBigQuery.
| Field | Type | Description |
|---|---|---|
billing_account_id | String | The 18-character, alphanumeric billing account ID associated with the CUD data, for example,010101-F0FFF0-10XX01. |
cud_product.id | String | The subscription definition ID, for example344fffc1-17f9-4e34-abf2-cfffff409fa2. |
cud_product.display_name | String | The friendly name of the product associated with the commitment, for exampleFlexible CUD. |
cud_product.type | String | The type of product commitment, for exampleSpend-Based. |
consumption_model.id | String | The ID of theconsumption model used by the CUD, for example5515-81A8-03A2. |
consumption_model.description | String | The description of theconsumption model for the CUD, for exampleCloud Spanner CUD - 1 Year. |
subscription.entitlement_scope | String | The scope of the entitlement for the CUD, for example, an account-scoped entitlement might bebillingAccounts/010101-F0FFF0-10XX01. |
subscription.instance_id | String | The subscription instance ID which is a GUID, for example769c55ea-c50f-4258-bcf5-04b6688fa5fa. |
subscription.display_name | String | The display name for the CUD, defined by the customer at time of purchase, for exampleRecommended Cloud Run CUD commitment in us-central1 on Sep 3, 2023. |
region | String | The region associated with the CUD, for exampleus-central1. |
commitent_amount.unit | String | The measurement unit of resource consumption for the commitment, for example,$/hr. |
commitent_amount.value | Numeric | The commitment amount purchased, for example100 or0.05. |
term | String | The term of the commitment inISO 8601 duration format, whereP1Y represents one year, andP3Y represents three years. |
start_time | Timestamp | The start timestamp for the commitment, for example2024-09-27 18:08:20 UTC. |
end_time | Timestamp | The end timestamp for the commitment, for example2025-02-18 12:11:20 UTC. |
state | String | The state of the commitment, for exampleActive orExpired. |
Related topics
Topics related to exported Cloud Billing data
- Set up Cloud Billing data export to BigQuery
- Example queries for Cloud Billing data export to BigQuery
- Visualize spend over time with Looker Studio
Cost and pricing reports available in the Google Cloud console
- View your Cloud Billing reports and cost trends
- View and download the cost details of your invoice or statement
- View and download prices for Google's cloud services
- Understand your savings with cost breakdown reports
- Analyze the effectiveness of your committed use discounts
- View your cost and payment history
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.