- A
You are not using the exactly-once sink option for BigQuery
Why wrong: The exactly-once sink uses a different method; insertId alone suffices only if insertId is reused across retries.
- B
You have set .withOutputParallelization() to false
Why wrong: That affects file sinks, not BigQuery.
- C
The pipeline is using at-least-once mode and bundles are being retried, but the insertId is not being reused across retry attempts
If the insertId is generated per element per attempt, duplicates can occur on retry.
- D
You need to enable Dataflow's built-in deduplication using the .withIdAttribute() in Pub/Sub read
Why wrong: That deduplicates within Dataflow, but the sink may still produce duplicates if insertId is not consistent.
Quick Answer
The answer is that duplicates occur because the pipeline uses at-least-once mode and bundles are being retried, but the insertId is not being reused across retry attempts. In Cloud Dataflow, at-least-once processing means that if a bundle fails, it is retried, and each retry generates a new write attempt to BigQuery. For BigQuery’s deduplication to work, the insertId must be stable and identical across all retries of the same record; if it is generated dynamically per attempt or not properly propagated, BigQuery sees each write as a unique row, leading to duplicates. On the Google Professional Cloud Developer exam, this tests your understanding of how Dataflow’s default delivery semantics interact with BigQuery’s best-effort deduplication—a common trap is assuming .withInsertId() alone guarantees exactly-once delivery without ensuring the ID is deterministic across retries. Remember the memory tip: “Stable ID, no duplicate; fresh ID, duplicate.”
PCD Building and testing applications Practice Question
This PCD practice question tests your understanding of building and testing applications. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
You are building a data pipeline using Cloud Dataflow (Apache Beam). The pipeline reads from Pub/Sub, performs aggregations, and writes to BigQuery. Occasionally, you see duplicates in the BigQuery output, even though the pipeline uses .withInsertId() in the BigQuery write transform. What could be causing these duplicates?
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
The pipeline is using at-least-once mode and bundles are being retried, but the insertId is not being reused across retry attempts
Option C is correct because Cloud Dataflow (Apache Beam) operates in at-least-once mode by default, meaning bundles may be retried during processing. When a bundle is retried, the insertId set via .withInsertId() must be reused across retry attempts to enable BigQuery's deduplication. If the insertId is not reused (e.g., because it's generated per attempt or not properly propagated), BigQuery treats each write as a separate row, resulting in duplicates.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
You are not using the exactly-once sink option for BigQuery
Why it's wrong here
The exactly-once sink uses a different method; insertId alone suffices only if insertId is reused across retries.
- ✗
You have set .withOutputParallelization() to false
Why it's wrong here
That affects file sinks, not BigQuery.
- ✓
The pipeline is using at-least-once mode and bundles are being retried, but the insertId is not being reused across retry attempts
Why this is correct
If the insertId is generated per element per attempt, duplicates can occur on retry.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
You need to enable Dataflow's built-in deduplication using the .withIdAttribute() in Pub/Sub read
Why it's wrong here
That deduplicates within Dataflow, but the sink may still produce duplicates if insertId is not consistent.
Common exam traps
Common exam trap: answer the scenario, not the keyword
Cisco often tests the misconception that .withInsertId() alone guarantees exactly-once delivery, when in fact it requires the insertId to be stable across retries, and candidates may overlook the default at-least-once processing mode of Dataflow.
Detailed technical explanation
How to think about this question
Under the hood, BigQuery streaming inserts use the insertId as a best-effort deduplication key for up to one minute. In Dataflow, when a bundle fails and is retried, the same insertId must be assigned to the same element across retries; if the insertId is generated dynamically (e.g., using a random UUID per attempt), each retry creates a new insertId, bypassing deduplication. A real-world scenario is when using .withInsertId() with a UUID generated inside a ParDo, which is not idempotent across retries.
KKey Concepts to Remember
- Read the scenario before looking for a memorised answer.
- Find the constraint that changes the correct option.
- Eliminate answers that are true in general but not in this case.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
- →
Building and testing applications — study guide chapter
Learn the concepts, then practise the questions
- →
Building and testing applications practice questions
Targeted practice on this topic area only
- →
All PCD questions
500 questions across all exam domains
- →
Google Professional Cloud Developer study guide
Full concept coverage aligned to exam objectives
- →
PCD practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related PCD practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Designing highly scalable, available, and reliable cloud-native applications practice questions
Practise PCD questions linked to Designing highly scalable, available, and reliable cloud-native applications.
Building and testing applications practice questions
Practise PCD questions linked to Building and testing applications.
Deploying applications practice questions
Practise PCD questions linked to Deploying applications.
Integrating Google Cloud services practice questions
Practise PCD questions linked to Integrating Google Cloud services.
Managing application performance monitoring practice questions
Practise PCD questions linked to Managing application performance monitoring.
PCD fundamentals practice questions
Practise PCD questions linked to PCD fundamentals.
PCD scenario practice questions
Practise PCD questions linked to PCD scenario.
PCD troubleshooting practice questions
Practise PCD questions linked to PCD troubleshooting.
Practice this exam
Start a free PCD practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this PCD question test?
Building and testing applications — This question tests Building and testing applications — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: The pipeline is using at-least-once mode and bundles are being retried, but the insertId is not being reused across retry attempts — Option C is correct because Cloud Dataflow (Apache Beam) operates in at-least-once mode by default, meaning bundles may be retried during processing. When a bundle is retried, the insertId set via .withInsertId() must be reused across retry attempts to enable BigQuery's deduplication. If the insertId is not reused (e.g., because it's generated per attempt or not properly propagated), BigQuery treats each write as a separate row, resulting in duplicates.
What should I do if I get this PCD question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 25, 2026
This PCD 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 PCD exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.