Comment on page
💲

How to setup BigQuery Cost Exports?

How to setup BigQuery Cost Exports?

Setting up BigQuery cost exports in Google Cloud Platform (GCP) is a relatively simple process that allows you to export your project's billing data to a BigQuery dataset. With this feature, you can easily analyze and monitor your project's usage and cost trends over time. In this documentation, we will walk through the steps required to set up BigQuery cost exports.
Step 1: Create a BigQuery Dataset to store your billing exports
Before you can start exporting your billing data to BigQuery, you need to create a BigQuery dataset. To do this, follow these steps:
  1. 1.
    Open the BigQuery console in your GCP project.
  2. 2.
    Click on the "Create dataset" button.
  3. 3.
    Give your dataset a name and select your desired location.
  4. 4.
    Click on "Create dataset".
Once your dataset is created, you can proceed to the next step.
Step 2: Enable Billing Export
To enable billing export, follow these steps:
  1. 1.
    Open the GCP console, and go to the Billing tab
  2. 2.
    Click on the billing account that you want to export data from.
  3. 3.
    Click on the "Billing export" button in the left-hand menu.
  4. 4.
    Click on the "Create export" button.
  5. 5.
    Select the BigQuery option.
  6. 6.
    Choose the dataset that you created in Step 1.
  7. 7.
    Choose the table name for your billing export. The table name will be used to store your billing data in BigQuery.
  8. 8.
    Click on "Save".
Step 3: Verify Export Data
Once you have set up your BigQuery cost exports, it may take a few hours for the initial data to appear in your dataset. To verify that your export is working correctly, follow these steps:
  1. 1.
    Open the BigQuery console in your GCP project.
  2. 2.
    Select the dataset that you created in Step 1.
  3. 3.
    Look for the presence of tables, there would be a table that starts with gcp_billing_export_
  4. 4.
    Click on the table name and click on Preview view the data.
  5. 5.
    If you have data coming in, the billing export setup is successful.