Courseiva
Maintaining and Automating Data WorkloadshardMultiple ChoiceObjective-mapped

PDE Maintaining and Automating Data Workloads Practice Question

A company runs a streaming Dataflow pipeline that reads from Pub/Sub, enriches data with a side input from BigQuery, and writes to BigQuery. After updating the pipeline code (adding a new field to the output), the engineer notices that the new pipeline version is not picking up the updated code because the job was started from a template. The engineer wants to update the streaming pipeline without draining it. What should the engineer do?

⚠ Common exam trap

A common misconception is that you must drain or stop a streaming Dataflow pipeline to update it, but the `gcloud dataflow jobs update` command is specifically designed for in-place updates of streaming jobs started from templates.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use the gcloud dataflow jobs update command with the new Flex Template.

The `gcloud dataflow jobs update` command allows you to update a running streaming Dataflow pipeline with a new Flex Template without draining or stopping the job. This command performs an in-place update, preserving the job's state and checkpointing, so the pipeline continues processing with the new code. Since the original job was started from a template, using this command with the new Flex Template ensures the updated code is picked up seamlessly.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use the gcloud dataflow jobs update command with the new Flex Template.

    Why this is correct

    Dataflow supports updating a running streaming job from a Flex Template by specifying --update and the job ID. This allows code changes without draining.

  • Stop the pipeline, update the template, and restart with the same job name.

    Why it's wrong here

    Stopping causes data loss unless using drain; restarting loses checkpointed state. The requirement is to update without draining.

  • Modify the original template and redeploy it as a new job with the same pipeline name.

    Why it's wrong here

    Redeploying as a new job creates a separate pipeline; the original continues running. You cannot update a running job by launching a new one.

  • Use the gcloud dataflow jobs drain command, then restart with the new template.

    Why it's wrong here

    Draining stops the pipeline gracefully but violates the requirement of updating without draining.

About these practice questions

Courseiva writes every PDE question from scratch — 890 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PDE exam.