Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use bigquery usage statistics to measure costs #1383

Open
ravenac95 opened this issue May 8, 2024 · 0 comments
Open

Use bigquery usage statistics to measure costs #1383

ravenac95 opened this issue May 8, 2024 · 0 comments

Comments

@ravenac95
Copy link
Member

ravenac95 commented May 8, 2024

What is it?

We can better measure our usage of bigquery by making queries like this:

SELECT *
FROM `region-us`.INFORMATION_SCHEMA.JOBS_BY_PROJECT 
--`region-us` gets results for all jobs in the US region

This query allows us to track usage data for each of our queries. The schema is defined here. We should be able to determine the total bytes processed as actually see the most costly queries here. Additionally, each of the jobs listed has the user that executed the job as well as a plethora of other potentially useful information to understand the operation of each query.

To determine costs, we would simply need to multiply "bytes processed" by bigquery's pricing model.

@ccerv1 ccerv1 added this to the (c) Data warehouse milestone May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants