To get started with Google Cloud, you need to have a Billing account. A billing account can be associated with multiple projects. All the resources and services that are used in a project are paid by the Billing account linked to that project, in a single currency. If the billing account is not linked, you cannot use Google Cloud services. The Billing Account Administrator manages the transaction, and expenditure, and can enable the Billing Export to analyze data.
There are two ways to do this: By exporting data to BigQuery and By exporting data to CSV. This article will emphasize on exporting billing data to CSV. But if you are setting up new Billing export, this option is depriciated. However, there is a way to download your data in CSV via cost table.
What is Cost Table?
The Google Cloud console offers a cost table report that helps you understand the costs associated with your invoice. They are represented in the form of tables which gives you an overview of your costs for a particular invoice. Cost table reports are generated from your invoices and statements and display project-specific costs, including tax costs. There are also service IDs, SKU IDs, and project numbers included. The report view is customizable and downloadable to CSV.
To view the cost table report of your Cloud Billing account, you must have the following permission:
- billing.accounts.getSpendingInformation to view costs and usage for a billing account.
View the report
The steps for viewing the cost table report are as follows:
- Go to your Cloud Billing account in the Google Cloud console.
- Click the Cloud Billing account for which you wish to view reports.
- When you select a billing account, you’ll be taken to the Billing Overview page.
- Select the cost table under the Billing navigation menu.
These steps will show you the cost tables. Given below is a screenshot of how your table will look like.
It is pretty easy to download the CSV file, but the question is how to do it?
Following are the steps to get your CSV report downloaded:
Step 1: Click on the “down arrow” icon in section 4 of the screenshot. By default, it is set to the recent invoice month.
Step 3: In the filters section, select any month invoice/ or apply filters to download a subset of billing data.
Many organizations export data to BigQuery as it is widely used, but some find it convenient to export it to CSV for quick analysis and or to make graphs with their spreadsheet. The article highlights the fact that companies can still export their data into CSV via the Cost Table. The trickiest part here is to find the “download to CSV” button. Once you get the CSV file, you can start analyzing your data.