Search
Clear search
Close search
Google apps
Main menu

Export billing data to BigQuery

Tools for monitoring, analyzing and optimizing cost have become an important part of managing development. Billing export to Google BigQuery enables you to export your daily usage and cost estimates automatically throughout the day to a BigQuery dataset you specify. You can then access your billing data from BigQuery. You can also use this export method to export data to a JSON file.

Note: Regular file export to CSV and JSON is also available. However, if you use regular file export, you should be aware that regular file export captures a smaller dataset than export to BigQuery. For more information about regular file export and the data it captures, see Export billing data to a file and Contents of the exported billing file. For information about the data captured using export to BigQuery, see Billing data in BigQuery.

To enable billing export to BigQuery:

  1. Go to the Cloud Platform Console.
  2. Open the left side menu and select Billing  Billing
  3. If you have more than one billing account, select the name of the account you're interested in.
  4. Click Billing export.
  5. Select BigQuery export.
  6. From the Project list, select the project where your BigQuery dataset is stored. If you don’t have a BigQuery dataset created yet, you’ll be prompted to create one.

    If necessary, to create a new dataset:

    1. In the BigQuery web UI, click the down arrow icon next to your project name, then click Create new dataset.
    2. Specify the Dataset ID, Data location, and Data expiration for your dataset, then click OK.
  7. In the console, from the Billing export dataset list, specify a dataset to export data to. If you just created a dataset, choose the name of your new dataset.
  8. Click Enable BigQuery export.

After you enable BigQuery export, it might take a few hours to start seeing your data. Billing data automatically exports your data to BigQuery in regular intervals, but the frequency of updates in BigQuery varies depending on the services you're using.

For descriptions of the contents of the exported billing data, see Billing data in BigQuery. For detailed information about working with BigQuery, see the Google BigQuery Documentation.

Using Google BigQuery to store usage data will incur minimal fees. For more information, see Google BigQuery Pricing.

Note: This feature is in preview. The formatting and content of the dataset might change.

Was this article helpful?
How can we improve it?