Can I process my query history within bigquery?

Can I get the queries run in my project’s query history, including the Bytes Billed, in some kind of select statement I can run in bigquery itself to do analysis?

>Solution :

You sure can!
Check out the INFORMATION_SCHEMA.JOBS_BY_* views

https://cloud.google.com/bigquery/docs/information-schema-jobs

There are various flavors including jobs by user, project, folder, organization.

They include the total_bytes_processed and total_bytes_billed as well.

Here is a sample query

SELECT
 job_id,
 total_bytes_billed
FROM
 `region-us`.INFORMATION_SCHEMA.JOBS_BY_PROJECT

Leave a Reply