Advertisement
Guest User

Untitled

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