Open upgradedcloud opened 4 weeks ago
You could try getting a per-region and per-project estimate from the Information Schema https://cloud.google.com/bigquery/docs/information-schema-jobs
Here's a sample query for costs over the last 30 days:
SELECT
user_email,
SUM(total_bytes_processed)/POWER(2,40) AS total_terabytes_processed,
SUM(total_bytes_processed)/POWER(2,40) * 5 AS estimated_cost -- Assuming $5 per TB
FROM
`<your-project>`.`region-us`.INFORMATION_SCHEMA.JOBS_BY_PROJECT
WHERE
creation_time BETWEEN TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY)
AND CURRENT_TIMESTAMP()
AND job_type = 'QUERY'
AND state = 'DONE'
GROUP BY
user_email
ORDER BY
estimated_cost DESC;
BigQuery per user cost ?
Hi all , is it possible to get the per user cost for bq in my project ?