Courseiva
mediumMultiple Choice

PDE Practice Question: A company processes real-time clickstream data…

A company processes real-time clickstream data from websites. They need to aggregate user sessions that may span multiple hours and handle events that arrive late due to network delays. The pipeline must avoid discarding late data. Which Dataflow feature should they configure?

⚠ Common exam trap

Google Cloud often tests the distinction between window types and late-data handling; the trap here is that candidates might choose fixed or sliding windows without realizing they lack the session-gap logic needed for variable-length user sessions, or they might overlook the `allowed_lateness` parameter as the key to preserving late data.

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 session windows with a gap duration and allow late data with a suitable allowed_lateness

Session windows are ideal for aggregating user sessions that span multiple hours, as they group events based on a gap duration of inactivity. By configuring `allowed_lateness`, the pipeline can handle late-arriving events without discarding them, ensuring completeness. This directly addresses the requirement to avoid discarding late data while aggregating sessions.

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 fixed windows with a trigger that fires after every element

    Why it's wrong here

    Fixed windows with per-element triggers still assign late events to closed windows and discard them by default, so multi-hour sessions and late arrivals are lost. Fixed windows suit bounded, ordered streams; session windows with allowed lateness are required when events span hours and arrive out of order.

  • ✓

    Use session windows with a gap duration and allow late data with a suitable allowed_lateness

    Why this is correct

    Session windows group events separated by a gap duration, so multi-hour user sessions merge correctly. Setting allowed_lateness retains events arriving after the watermark, preventing discarding of network-delayed clickstream data, which directly satisfies the no-late-data-loss constraint.

  • ✗

    Use the GlobalWindow with a watermark

    Why it's wrong here

    A global window with a watermark never closes for unbounded data, so sessions cannot be emitted per user; session windows keyed by user are required. Global windows suit pipelines needing a single total aggregate, such as counting all events across the stream.

  • ✗

    Use sliding windows with no allowed lateness

    Why it's wrong here

    Sliding windows with no allowed lateness discard events arriving after the watermark passes, directly violating the no-discard requirement. Sliding windows suit continuously updated rolling metrics, such as a five-minute average recomputed every minute, where some late loss is acceptable.

About these practice questions

This PDE question is part of Courseiva's 747-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.