Courseiva

PDE Ingesting and Processing the Data Practice Question

You are building a Dataflow pipeline that reads from Pub/Sub and writes to BigQuery. You need to ensure that no duplicates are written to BigQuery even if the pipeline retries messages. Which feature should you use?

⚠ Common exam trap

The trap here is relying on Pub/Sub's exactly-once delivery alone, which does not extend to the BigQuery sink and does not prevent duplicate writes.

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

✓

Enable exactly-once processing in Dataflow and use BigQuery's Storage Write API with exactly-once semantics.

The combination of Dataflow's exactly-once processing and the BigQuery Storage Write API's exactly-once semantics guarantees that each message is written once, even if the pipeline retries. This is the recommended approach for avoiding duplicates in streaming pipelines.

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 a GroupByKey transform to deduplicate messages before writing to BigQuery.

    Why it's wrong here

    GroupByKey can group messages by a key, but it does not inherently deduplicate unless you apply a deduplication logic. Moreover, it does not guarantee exactly-once writes to BigQuery because retries after the write can still cause duplicates. It also adds complexity and potential latency.

  • ✗

    Write to BigQuery using streaming inserts and then run a periodic deduplication job.

    Why it's wrong here

    Periodic deduplication is a batch process that does not prevent duplicates from being visible in the interim and adds latency. It also requires additional logic to identify and remove duplicates, which is error-prone. This approach does not provide exactly-once semantics.

  • ✗

    Use Pub/Sub's exactly-once delivery and rely on BigQuery's default streaming insert deduplication.

    Why it's wrong here

    Pub/Sub's exactly-once delivery applies to message delivery to subscribers, not to writes to BigQuery. BigQuery's default streaming inserts do not deduplicate across retries, so duplicates can still occur. Additional measures are needed to ensure exactly-once writes.

  • ✓

    Enable exactly-once processing in Dataflow and use BigQuery's Storage Write API with exactly-once semantics.

    Why this is correct

    Dataflow's exactly-once processing combined with the BigQuery Storage Write API's exactly-once delivery ensures that each message is written exactly once, even on retries. This is the most robust way to avoid duplicates in the target table.

About these practice questions

This PDE question is part of Courseiva's 747-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Google Cloud exam blueprint

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.