Complete the code to enable billing export to BigQuery.
gcloud beta billing export bigquery set --billing-account [1] --dataset my_billing_datasetThe billing account ID is required to enable export. It looks like a string with numbers and letters separated by dashes.
Complete the code to create a BigQuery dataset for billing export.
bq mk --dataset [1]:my_billing_datasetThe dataset must be created in the project where billing data will be stored, so the project ID is needed here.
Fix the error in the SQL query to calculate total cost per service.
SELECT service.description, SUM(cost) AS total_cost FROM `[1].gcp_billing_export_v1_0123456789ABCDEF` GROUP BY service.descriptionThe correct dataset name must be used in the query. It should match the dataset where billing export is stored.
Fill both blanks to filter billing data for the last 30 days and group by project.
SELECT project.id, SUM(cost) AS total_cost FROM `[1].my_billing_dataset.[2]` WHERE usage_start_time >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY) GROUP BY project.id
The first blank is the project ID, and the second blank is the billing export table name.
Fill all three blanks to create a billing alert policy using gcloud CLI.
gcloud alpha billing budgets create --billing-account=[1] --display-name=[2] --amount=[3]
The billing account ID is needed, then a display name in quotes, and finally the budget amount as a number.