easyMultiple ChoiceObjective-mapped
PDE Practice Question: A data pipeline processes streaming data with…
A data pipeline processes streaming data with Dataflow. The team notices occasional data duplication in BigQuery. What is the best approach to ensure exactly-once processing?
⚠ Common exam trap
Many candidates assume deduplication at the destination (BigQuery) is sufficient, but the key insight is that exactly-once processing must be enforced at the pipeline level (Dataflow) using mechanisms like file staging and atomic commit to avoid race conditions and state inconsistencies across distributed workers.
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
✓
Configure Dataflow with exactly-once sinks using file staging and deduplication.
Dataflow's exactly-once sinks use a two-phase commit protocol with file staging and deduplication to ensure that each record is written exactly once to the sink, even if the pipeline retries. This approach handles the inherent at-least-once delivery from Pub/Sub by staging output files and committing them atomically, preventing duplicates in BigQuery without relying on downstream deduplication.
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 Pub/Sub with at-least-once delivery and deduplicate in BigQuery using a unique identifier.
Why it's wrong here
At-least-once delivery requires manual deduplication, which is error-prone and not automatically ensured by Dataflow.
- ✓
Configure Dataflow with exactly-once sinks using file staging and deduplication.
Why this is correct
Dataflow's exactly-once sink mechanism ensures each record is written exactly once, preventing duplicates.
- ✗
Use Cloud Functions to deduplicate messages before they enter the pipeline.
Why it's wrong here
Deduplicating before the pipeline adds latency and complexity; it is not a built-in Dataflow feature.
- ✗
Enable idempotent writes in BigQuery.
Why it's wrong here
BigQuery does not support idempotent writes; deduplication must be handled upstream.
Go deeper
Related to this question
About these practice questions
One of 890 original PDE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.