easyMultiple Choice
PDE Practice Question: Designing a streaming Dataflow pipeline that…
You are designing a streaming Dataflow pipeline that reads from Cloud Pub/Sub. Some data may arrive late due to network delays. You need to ensure that late-arriving data is still processed, but after a certain point, it should be discarded to avoid unbounded state. What is the best practice?
⚠ Common exam trap
Test-takers frequently confuse 'allowed lateness' with simply discarding late data, failing to recognize that it provides a controlled buffer for late arrivals while still bounding state growth.
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
✓
Set a watermark and allowed lateness
In streaming Dataflow pipelines, setting a watermark and allowed lateness provides a mechanism to handle late-arriving data from Pub/Sub without unbounded state growth. The watermark defines the point after which data is considered late, and allowed lateness specifies how long to wait for late data before discarding it, balancing completeness and state management.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Switch to a batch pipeline
Why it's wrong here
Batch pipelines cannot process unbounded, continuously arriving Pub/Sub streams, so late data handling and state expiry become impossible. It is tempting when reprocessing historical data, and would be correct for scheduled bulk analytics over bounded datasets rather than continuous streaming.
- ✗
Use fixed windows without allowed lateness
Why it's wrong here
Fixed windows without allowed lateness discard every late element immediately, so none of the delayed data is processed at all. It is tempting for simplicity, and would be correct when all events arrive on time and no lateness tolerance is required.
- ✗
Discard all late-arriving data
Why it's wrong here
Discarding all late data contradicts the requirement that late-arriving records still be processed before the cutoff. It is tempting as a simple way to bound state, and would be correct only if the business genuinely did not care about any delayed events.
- ✓
Set a watermark and allowed lateness
Why this is correct
A watermark tracks event-time progress, while allowed lateness defines how long late records are still accepted before their window's state is discarded. This directly satisfies the constraint: late data is processed, yet state remains bounded rather than growing indefinitely.
Go deeper
Related to this question
About these practice questions
Courseiva writes every PDE question from scratch — 747 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 →
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.