Bitzu

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

Single choice

Which command lists BigQuery jobs?

  1. bq ls -j
  2. bq ls -d
  3. bq show -t
  4. gcloud bigquery jobs run
Show answer

Answer: A. bq ls -j

The -j flag makes bq ls list jobs instead of datasets or tables.

Select all that apply

Which are valid BigQuery job states?

  1. PENDING
  2. RUNNING
  3. DONE
  4. STAGED
  5. 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.

True or false

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.

Download on the App StoreGet it on Google Play

More Associate Cloud Engineer topics in this module