简体   繁体   中英

How to get bigquery's scheduled queries execution log programmatically?

I would like to get execution log of scheduled queries in bigquery programmatically. It is very much possible using web UI but if there any way using Standard SQL or any API which is providing that log would be fine.

Thanks in advance

Try querying the INFORMATION_SCHEMA.JOBS_BY_PROJECT view.

For example:

select *
FROM `elzagales`.`region-us`.INFORMATION_SCHEMA.JOBS_BY_PROJECT
where
  job_id like "%scheduled_query%"
  and priority = "BATCH"

you may need to adjust your job_id if you provide a custom job_id to your scheduled queries.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM