Professional Data Engineer Practice Questions

Google Cloud Professional Data Engineer exam preparation

Professional Data Engineer practice questions in English: 180 questions with explanations. The mock exam has 50 questions and 120 minutes.

Professional Data Engineer free question 10 / 10 · Domain 5: Maintaining and automating data workloads

In a Dataflow streaming job that uses Streaming Engine, you fix the pipeline code and launch a replacement job. Which statement matches the "Update an existing pipeline" page?

  1. The replacement job runs with the same job name and the same job ID as the previous job, with no downtime
  2. You also need to launch a replacement job when you only change the minimum and maximum number of workers
  3. The replacement job inherits the intermediate state data of the previous job and also the in-memory caches on the workers
  4. If the compatibility check fails, the previous job keeps running and the replacement job returns an error
Show the answer and explanation

Answer: D

Why this is correct
The "Job compatibility check" section says that when you launch a replacement job, Dataflow checks compatibility between the replacement job and the previous job. If the check passes, the previous job is stopped and the replacement job starts with the same job name. If the check fails, the previous job keeps running in Dataflow and the replacement job returns an error. The compatibility check is there to make sure that the intermediate state and the data in buffers can be moved from the previous job to the replacement job.

Why the other options are wrong
"The replacement job inherits the intermediate state data of the previous job and also the in-memory caches on the workers" … The section "The effects of replacing a job" says the replacement job inherits the intermediate state data of the previous job, but in-memory caches are not preserved. If you want to keep a cache, it gives workarounds of reworking the cache into state data or a side input.
"The replacement job runs with the same job name and the same job ID as the previous job, with no downtime" … The same section says Dataflow keeps the job name but runs the replacement job under a new job ID, and that there can be downtime while the previous job stops, the compatibility check runs, and the new job starts.
"You also need to launch a replacement job when you only change the minimum and maximum number of workers" … The "In-flight job option update" section says that for streaming jobs that use Streaming Engine, you can update min-num-workers and max-num-workers (and worker-utilization-hint) without stopping the job or changing the job ID. A replacement job is needed for other kinds of updates.

Key point
The top of the page says updating batch pipelines is not supported, and gives two ways to update a streaming job: an in-flight update and a replacement job. A replacement job inherits the previous job's intermediate state data, the in-flight data in buffers (for example, while waiting for windows to close), and the in-flight option updates applied to the previous job. Before launching, you can validate the replacement job's job graph to check that the replacement is valid.

Go to the Professional Data Engineer practice app (10 free questions; purchase unlocks all questions)

See the full practice set