- A
Use a session window with max gap duration
Why wrong: Session windows group events by activity gaps, not for in-order processing.
- B
Use a keyed state with a value state per customer
Why wrong: Keyed state is a technique, but stateful processing with event time ordering is the specific configuration needed.
- C
Use Dataflow stateful processing with event time ordering
Dataflow stateful processing with event time ordering allows processing events per key in the order they were generated, with exactly-once guarantees.
- D
Use a Pub/Sub topic with ordering keys
Ordering keys in Pub/Sub guarantee that messages with the same key are delivered to subscribers in order.
- E
Use a global window with a trigger
Why wrong: Global windows with triggers produce panes but do not preserve order within a key.
Guarantee Exactly-Once Processing and Ordering per Customer Key
This PDE practice question tests your understanding of ordering keys. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. A key principle to apply: ordering keys. 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.
A streaming pipeline uses Cloud Pub/Sub and Dataflow to process financial transactions. The pipeline must guarantee that each transaction is processed exactly once and in order per customer key. Which two configurations are necessary? (Choose two.)
Quick Answer
The answer is to use a Pub/Sub topic with ordering keys and Dataflow stateful processing with event time ordering. Pub/Sub ordering keys guarantee that messages sharing the same customer key are delivered to the subscriber in the exact order they were published, which is essential for financial transactions where sequence matters. Dataflow’s stateful processing then maintains per-key state and processes events based on their event time, ensuring exactly-once semantics even during failures or retries. On the Google Professional Data Engineer exam, this pairing tests your understanding of how to combine Pub/Sub’s ordered delivery with Dataflow’s robust processing model to achieve both ordering and exactly-once guarantees in a streaming pipeline. A common trap is thinking a global window or session window can enforce order, but these only group events without preserving sequence. Memory tip: “Ordered keys in, stateful processing out” — the ordering key locks the sequence, and stateful Dataflow locks the processing.
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 Dataflow stateful processing with event time ordering
Option C is correct because Dataflow's stateful processing with event time ordering allows you to maintain per-key state and process elements in the order of their event timestamps, which is essential for guaranteeing exactly-once processing and in-order handling per customer key. This ensures that each transaction is processed once and in the correct sequence, even in the presence of out-of-order data arrival. Option D is also correct because Pub/Sub ordering keys enable messages with the same ordering key to be delivered to the subscriber in the order they were published. By using ordering keys corresponding to customer keys, the pipeline can receive transactions for each customer in order, which is a prerequisite for in-order processing. Together, these two configurations provide end-to-end exactly-once and in-order guarantees.
Key principle: Ordering keys
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 session window with max gap duration
Why it's wrong here
Session windows group events by activity gaps, not for in-order processing.
- ✗
Use a keyed state with a value state per customer
Why it's wrong here
Keyed state is a technique, but stateful processing with event time ordering is the specific configuration needed.
- ✓
Use Dataflow stateful processing with event time ordering
Why this is correct
Dataflow stateful processing with event time ordering allows processing events per key in the order they were generated, with exactly-once guarantees.
Related concept
Ordering keys
- ✓
Use a Pub/Sub topic with ordering keys
Why this is correct
Ordering keys in Pub/Sub guarantee that messages with the same key are delivered to subscribers in order.
Related concept
Ordering keys
- ✗
Use a global window with a trigger
Why it's wrong here
Global windows with triggers produce panes but do not preserve order within a key.
Common exam traps
Common exam trap: answer the scenario, not the keyword
A common misconception is that session windows or global windows can provide per-key ordering, but these windowing strategies are designed for different use cases and do not enforce event time ordering or exactly-once processing per key. In Google Cloud, the correct approach combines Dataflow's stateful processing with Pub/Sub ordering keys.
Detailed technical explanation
How to think about this question
Under the hood, Dataflow's stateful processing leverages the Apache Beam model, which uses event time timestamps and watermarks to manage out-of-order data. The exactly-once guarantee is achieved through a combination of idempotent writes and checkpointing of state, ensuring that even if a worker fails, the state is restored and processing resumes without duplication. In real-world scenarios, this is critical for financial systems where duplicate or out-of-order transactions could lead to incorrect balances or audit failures.
KKey Concepts to Remember
- Ordering keys
- Stateful processing
- Event time ordering
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
Ordering keys
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. Ordering keys 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.
Review ordering keys, then practise related PDE questions on the same topic to reinforce the concept.
Related practice questions
Related PDE practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Designing Data Processing Systems practice questions
Practise PDE questions linked to Designing Data Processing Systems.
Ingesting and Processing the Data practice questions
Practise PDE questions linked to Ingesting and Processing the Data.
Storing the Data practice questions
Practise PDE questions linked to Storing the Data.
Preparing and Using Data for Analysis practice questions
Practise PDE questions linked to Preparing and Using Data for Analysis.
Maintaining and Automating Data Workloads practice questions
Practise PDE questions linked to Maintaining and Automating Data Workloads.
Building and operationalizing data processing systems practice questions
Practise PDE questions linked to Building and operationalizing data processing systems.
Operationalizing machine learning models practice questions
Practise PDE questions linked to Operationalizing machine learning models.
Ensuring solution quality practice questions
Practise PDE questions linked to Ensuring solution quality.
PDE fundamentals practice questions
Practise PDE questions linked to PDE fundamentals.
PDE scenario practice questions
Practise PDE questions linked to PDE scenario.
PDE troubleshooting practice questions
Practise PDE questions linked to PDE troubleshooting.
Practice this exam
Start a free PDE 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 PDE question test?
Ordering keys
What is the correct answer to this question?
The correct answer is: Use Dataflow stateful processing with event time ordering — Option C is correct because Dataflow's stateful processing with event time ordering allows you to maintain per-key state and process elements in the order of their event timestamps, which is essential for guaranteeing exactly-once processing and in-order handling per customer key. This ensures that each transaction is processed once and in the correct sequence, even in the presence of out-of-order data arrival. Option D is also correct because Pub/Sub ordering keys enable messages with the same ordering key to be delivered to the subscriber in the order they were published. By using ordering keys corresponding to customer keys, the pipeline can receive transactions for each customer in order, which is a prerequisite for in-order processing. Together, these two configurations provide end-to-end exactly-once and in-order guarantees.
What should I do if I get this PDE question wrong?
Review ordering keys, then practise related PDE questions on the same topic to reinforce the concept.
What is the key concept behind this question?
Ordering keys
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 →
Keep practising
More PDE practice questions
- A company wants to process large CSV files stored in Cloud Storage and load them into BigQuery. The files are generated…
- A company runs a Dataflow streaming pipeline that reads from Cloud Pub/Sub and writes to BigQuery. The pipeline uses a s…
- A company uses Cloud Dataproc for ephemeral clusters to run batch jobs. They want to ensure job reliability and data qua…
- Your company uses Vertex AI Pipelines to automate model retraining. The pipeline has three steps: data extraction from B…
- A company wants to use BigQuery to query data stored in Parquet files in Cloud Storage without loading the data into Big…
- A company has deployed a machine learning model to AI Platform Prediction. The model uses a custom container with a Tens…
Last reviewed: Jul 4, 2026
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.
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.