Courseiva
Ingesting and Processing the DatamediumMultiple SelectObjective-mapped

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)

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.

A sliding window of 1-hour length with a 1-minute slide period fits the requirement (every minute, compute over last hour). Fixed window of 1 minute would compute only per-minute, not sliding. Using stateful processing with timers is an alternative but not standard for sliding windows. Dataflow's default watermark is based on event time; processing time would cause incorrect results. The window type and period are the key.

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 ensures windows based on actual event occurrence time, necessary for correct sliding window semantics.

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

    Why this is correct

    This computes the average over the last hour, updated every minute.

  • Use a Fixed window of 1 minute.

    Why it's wrong here

    Fixed window does not slide; it would produce non-overlapping windows.

  • 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 would not correctly reflect event timestamps, causing inaccurate windows.

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 →

How Courseiva writes practice questions · Editorial policy

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.