Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Enable billing export into BigQuery.
- Go to Billing>Billing export in the Google Cloud Console.
- Create a new BigQuery dataset (billing_details in the below snippet), if needed, to store your billing data.
- Just click on the export in the UI and then customise the below snippet:
- SELECT l.value AS JobID, round(sum(cost),3) as JobCost
- FROM `[PROJECT].billing_details.gcp_billing_export_v1_[account_id]` bill, UNNEST(bill.labels) l
- WHERE DATE(_PARTITIONTIME) = "2019-05-14" and service.description = "Cloud Dataflow" and l.key = 'goog-dataflow-job-id'
- GROUP BY 1
- LIMIT 1000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement