Question

Difficulty: MediumCreating Billing Budgets, Alerts, and BigQuery Exports

A financial operations team needs to run custom SQL queries on detailed daily cost breakdown and usage metrics across all Google Cloud projects associated with their Cloud Billing account. They want an automated solution that continuously delivers raw billing logs to an analytical repository without relying on custom ingestion scripts. What is the Google Cloud recommended method to accomplish this configuration?

  1. Configure detailed Cloud Billing export directly within Cloud Billing, directing the automatic data stream to a target BigQuery dataset located in a centralized management project.Answer
  2. B
    Create a Cloud Billing budget with Pub/Sub programmatic notifications that trigger a Cloud Run service to pull cost metrics from the Cloud Billing API daily and append them to BigQuery.
  3. C
    Grant the Billing Account User role on the target BigQuery dataset to the default Compute Engine service account in each workload project to push daily billing files.
  4. D
    Enable the BigQuery Data Transfer Service API inside each individual workload project and schedule daily transfer jobs to copy cost records into a central BigQuery table.

Answer

The correct approach is to configure detailed Cloud Billing export directly within Cloud Billing, specifying a target BigQuery dataset located in a centralized project.
The correct answer specifies enabling BigQuery export directly within the Cloud Billing settings to a target BigQuery dataset. Google Cloud provides built-in Cloud Billing export functionality that automatically streams detailed cost and usage data into BigQuery tables, allowing organizations to run comprehensive SQL queries across all projects linked to the billing account without maintaining custom ingestion pipelines.

Step-by-Step Solution

1
Identify the destination project and create a BigQuery dataset in the same region/location desired for billing analytics.
A repository dataset is prepared to receive billing records.
Cloud Billing export requires an existing dataset with appropriate permissions to write data.
2
Navigate to Cloud Billing in the Google Cloud Console and open the Billing Export settings.
Access to Cloud Billing export options (Standard usage cost, Detailed usage cost, Pricing).
Export settings are managed centrally at the Billing Account level, not per individual workload project.
3
Enable BigQuery export and select the destination project and dataset.
Google Cloud automatically begins loading billing schema tables into the dataset on an ongoing basis.
This native integration handles data streaming automatically without needing custom API scripts or Pub/Sub handlers.

Key Concept

Cloud Billing BigQuery Export Configuration
Rate this question