Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bigquery cancel or stop a batch query job which is not started yet (Status.State = "PENDING")

If for some reason it is wanted to stop/cancel a batch query job that is not started yet (Status.State = "PENDING"), is it possible to do it? (library used: net Google.Apis.Bigquery.v2.1.5.0.122-beta).

like image 788
ggo Avatar asked Oct 21 '13 14:10

ggo


People also ask

How do I cancel my job on BigQuery?

The shell command bq cancel job_id will do this now. You can get the job_id from the Query History tab in the BigQuery console. If you started the query via the CLI, it will have logged the job_id to the standard output. Save this answer.


1 Answers

BigQuery now supports canceling query jobs. You can do this via the bq command line client via:

bq cancel <job_id>

or from the API via the jobs.cancel method (documented here)

like image 199
Jordan Tigani Avatar answered Dec 31 '22 19:12

Jordan Tigani