user433342
user433342

Reputation: 1048

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?

Upvotes: 0

Views: 318

Answers (1)

Daniel Zagales
Daniel Zagales

Reputation: 3034

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

Upvotes: 1

Related Questions