nerdexam
Google

PROFESSIONAL-DATA-ENGINEER · Question #348

You are building a streaming Dataflow pipeline that ingests noise level data from hundreds of sensors placed near construction sites across a city. The sensors measure noise level every ten seconds…

The correct answer is D. Use tumbling windows with a 15-minute window and a fifteen-minute .withAllowedLateness operator. There appears to be an error in the answer key - the stated correct answer (D) is incorrect. The actual correct answer is A. Why A is correct: Session windows group events based on activity and close automatically when no data arrives within the gap duration. A 15-minute gap…

Submitted by carlos_mx· Mar 30, 2026Designing data processing systems

Question

You are building a streaming Dataflow pipeline that ingests noise level data from hundreds of sensors placed near construction sites across a city. The sensors measure noise level every ten seconds, and send that data to the pipeline when levels reach above 70 dBA. You need to detect the average noise level from a sensor when data is received for a duration of more than 30 minutes, but the window ends when no data has been received for 15 minutes. What should you do?

Options

  • AUse session windows with a 15-minute gap duration.
  • BUse session windows with a 30-minute gap duration.
  • CUse hopping windows with a 15-minute window, and a thirty-minute period.
  • DUse tumbling windows with a 15-minute window and a fifteen-minute .withAllowedLateness operator.

How the community answered

(19 responses)
  • A
    11% (2)
  • B
    16% (3)
  • C
    5% (1)
  • D
    68% (13)

Explanation

There appears to be an error in the answer key - the stated correct answer (D) is incorrect. The actual correct answer is A.

Why A is correct: Session windows group events based on activity and close automatically when no data arrives within the gap duration. A 15-minute gap duration matches the requirement exactly: the window stays open as long as data keeps arriving, and closes after 15 minutes of silence. To enforce the "more than 30 minutes" condition, you'd filter output sessions by duration post-windowing.

Why D is wrong: Tumbling windows are fixed-size, non-overlapping intervals (e.g., exactly 15-minute blocks). They close on a schedule, not based on data inactivity. withAllowedLateness handles late-arriving data after a window closes - it has nothing to do with closing a window due to inactivity.

Why B is wrong: A 30-minute gap duration would wait 30 minutes of silence before closing the window - that's twice as long as required and would merge sessions that should be separate.

Why C is wrong: Hopping (sliding) windows have fixed size and fixed hop intervals; they don't adapt to data patterns or close based on inactivity.

Memory tip: Session windows = "activity-based" - think of a user session on a website that times out after inactivity. Any time a question says "window closes when no data arrives for X minutes," that's the session window signature. The gap duration is the inactivity timeout.

Topics

#Dataflow Windowing#Streaming Data Processing#Tumbling Windows#Late Data Handling

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-DATA-ENGINEER Practice