Associate Cloud Engineer ยท Operating databases and data jobs
How do you check job status in BigQuery and Dataflow?
bq ls -j, bq show -j, job states, gcloud dataflow jobs list/describe, reading errors.
Key points
- BigQuery: bq ls -j lists jobs (add -a for all users), bq show --job=true JOB_ID gives details; states are PENDING, RUNNING, DONE, and a DONE job ends as SUCCESS or FAILURE.
- Dataflow: gcloud dataflow jobs list --region=REGION --status=active|terminated|all, then gcloud dataflow jobs describe JOB_ID.
Source: https://docs.cloud.google.com/bigquery/docs/managing-jobs
Practice questions
Which command lists BigQuery jobs?
- bq ls -j
- bq ls -d
- bq show -t
- gcloud bigquery jobs run
Show answer
Answer: A. bq ls -j
The -j flag makes bq ls list jobs instead of datasets or tables.
Which are valid BigQuery job states?
- PENDING
- RUNNING
- DONE
- STAGED
- SUSPENDED
Show answer
Answer: A. PENDING, B. RUNNING, C. DONE
A job moves from PENDING to RUNNING to DONE. STAGED and SUSPENDED are not job states.
A BigQuery job in the DONE state has always succeeded.
Show answer
Answer: False
False. DONE only means finished; the outcome is SUCCESS or FAILURE, so check the error result.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
