Courseiva

PDE Ingesting and Processing the Data Practice Question

A company is building a real-time anomaly detection pipeline using Dataflow. Events are ingested from Pub/Sub, and the pipeline must compute a sliding window average every minute over a 1-hour window. Which TWO configurations are required for this pipeline? (Choose 2)

⚠ Common exam trap

The trap is assuming a FixedWindow can produce a rolling average — candidates who conflate 'window size' with 'update frequency' pick FixedWindow of 1 minute and miss that sliding windows require both a duration and a period.

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 the pipeline to use event time for watermarking.

Option A is correct because a sliding window over event data must be based on event time so that late-arriving events are assigned to the correct window and watermarks track the progress of event time rather than the wall-clock time at which elements are processed. Option B is correct because the requirement is a 1-hour window that is recomputed every minute, which is exactly a SlidingWindow with a duration of 1 hour and a period (slide) of 1 minute. Option C is incorrect because a FixedWindow of 1 minute produces independent non-overlapping 1-minute aggregates, not a 1-hour average refreshed each minute. Option D is incorrect because stateful processing with a custom timer is a lower-level mechanism and is not required when Apache Beam's built-in sliding windows already express the desired semantics. Option E is incorrect because processing-time watermarking ignores the event timestamps and would misassign late or out-of-order Pub/Sub messages, breaking the anomaly detection logic.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Set the pipeline to use event time for watermarking.

    Why this is correct

    Event-time watermarking derives progress from the timestamp embedded in each Pub/Sub message rather than arrival time, so the one-hour sliding window aggregates correctly despite network delays and out-of-order events. Without it, window results would be non-deterministic and inaccurate.

  • ✓

    Use a Sliding window of 1 hour with a 1-minute slide.

    Why this is correct

    A Sliding window with a one-hour duration and one-minute period emits an updated average every minute, each computed over the preceding hour. This exactly matches the stem's requirement to compute a sliding window average every minute over a one-hour window.

  • ✗

    Use a Fixed window of 1 minute.

    Why it's wrong here

    A fixed window of one minute produces independent per-minute aggregates, not the required one-hour sliding average recomputed each minute. SlidingWindows with a one-hour duration and one-minute period is needed. Fixed windows suit periodic non-overlapping reporting, such as hourly billing totals.

  • ✗

    Use stateful processing with a custom timer.

    Why it's wrong here

    Custom state and timers are not required here because Dataflow's built-in `SlidingWindows` primitive is precisely designed to handle the specified 1-hour sliding window, computing averages efficiently. This option is tempting as anomaly detection often involves complex state, and custom timers *can* manage time-based logic. However, they are intended for highly bespoke, event-driven state management or non-standard aggregations that fall outside Dataflow's comprehensive windowing capabilities, such as sessionisation or complex pattern matching that cannot utilise standard windowing strategies.

  • ✗

    Set the pipeline to use processing time for watermarking.

    Why it's wrong here

    Processing-time watermarking ignores the event timestamps carried in Pub/Sub messages, so late or out-of-order events land in the wrong window and skew the average. Event-time watermarking with allowed lateness is required. Processing time suits pipelines where arrival order is the only meaningful ordering.

About these practice questions

One of 747 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 →

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.