Enable Billing Export to BigQuery

The first thing we’ll need to do is get your billing data exported into a BigQuery dataset. This will allow us to use the dataset as the foundation for the graphs and queries used to build the billing report above.

Before you get started, though, please keep in mind that exporting your billing data requires Billing Admin permissions in GCP. So, check to make sure that you’ve got permission to make these changes, or work with someone in your organization who does. Otherwise, we won’t get very far…

Ok, so with that sorted out, let’s head on over to the Google Cloud Help Center, and get to work on the setup instructions here: Export billing data to BigQuery

Once you’ve gone through the steps there, it’ll take about a day (but sometimes less) to see the dataset begin to be populated with billing data. GCP services report billing separately, so don’t expect everything to be in there all at the same time. You might see some network egress first, then some VM charges, then PubSub usage, etc. Be patient, it’ll all get in there soon enough!

And once you’ve got data in your dataset, you can run fun queries against it, like so:

IMPORTANT NOTE: Your BigQuery dataset will only reflect billing incurred from the date you set up billing-export, forward. Billing data will NOT be added in retroactively, so you shouldn’t expect to see billing data from before export. We strongly encourage new customers to enable billing export to BigQuery as early as they can, so they have access to as much billing data as possible for analysis…