A batch analytics query that was launched two hours ago is still running and is consuming the entire on-demand slot pool for your project, delaying time-critical dashboards. You have BigQuery Admin privileges in the same project and know the job ID is us:job_6aabc23e3f4d7af. Using the bq command-line tool in Cloud Shell, which command will immediately stop the query while preserving its metadata for later inspection?
bq rm --recursive us:job_6aabc23e3f4d7af
bq cancel --location=us job_6aabc23e3f4d7af
gcloud data-access bigquery jobs abort us job_6aabc23e3f4d7af
The bq cancel command stops a running BigQuery job without deleting its metadata. You must supply the job's location with the --location flag when it is different from your default. After cancellation, the job record-including statistics and SQL text-remains available in INFORMATION_SCHEMA and the Jobs History page, letting you review what happened. Neither gcloud data-access nor bq rm can cancel a job; bq rm only deletes datasets or tables. Adding the --cancel modifier to bq query is unsupported once a job is already running.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the `bq cancel` command do in BigQuery?
Open an interactive chat with Bash
Why is the --location flag required in the `bq cancel` command?
Open an interactive chat with Bash
How can you inspect a cancelled job's metadata in BigQuery?
Open an interactive chat with Bash
What does the `bq cancel` command do?
Open an interactive chat with Bash
What is INFORMATION_SCHEMA and how does it help after a job cancellation?
Open an interactive chat with Bash
Why is the `--location` flag necessary in the `bq cancel` command?
Open an interactive chat with Bash
GCP Professional Data Engineer
Maintaining and automating data workloads
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .