Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view the bigquery jobs metadata correctly? INFORMATION_SCHEMA.JOBS_BY_ORGANIZATION

i'd like to use INFORMATION_SCHEMA.JOBS_BY_ORGANIZATION in bigquery to search and find the jobs between projects which are pointing to specific tables.

I did it with my own project using INFORMATION_SCHEMA.JOBS_BY_PROJECT but i can't see the ORGANIZATION'S one to ask between projects.

"Access Denied: Table bc-te-dlake-dev-s7b3:region-us.INFORMATION_SCHEMA.JOBS_BY_ORGANIZATION: User does not have permission to query table bc-te-dlake-dev-s7b3:region-us.INFORMATION_SCHEMA.JOBS_BY_ORGANIZATION."

I have the "organization administrator" rol in my project.

like image 562
CRISTIAN ERNESTO TORO LOPEZ Avatar asked Oct 16 '25 18:10

CRISTIAN ERNESTO TORO LOPEZ


2 Answers

Along with the correct permissions, make sure you have the project and region in your query e.g.

SELECT * FROM `myproject`.`region-eu`.INFORMATION_SCHEMA.JOBS_BY_USER;
like image 94
NK5 Avatar answered Oct 18 '25 19:10

NK5


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

JOBS_BY_ORGANIZATION requires bigquery.jobs.listAll for the organization and is available to the Organization bigquery.resourceAdmin, Organization Owner and Organization Admin roles. Note that JOBS_BY_ORGANIZATION is only available to users with defined Google Cloud organizations.

Verify you have all the required roles at the org as defined in the above docs

like image 44
Daniel Zagales Avatar answered Oct 18 '25 19:10

Daniel Zagales



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!