Topic 1 · Question 342
You are using Dataflow to build a streaming data pipeline to analyze user website click activity from Pub/Sub. You need to calculate the number of clicks for each user site visit. A site visit is defined as a period of activity followed by 30 minutes of inactivity for a specific user. What should you do?
- AUse tumbling windows with a 30-minute window.
- BUse hopping windows with a 30-minute window, and a 1-minute period.
- CUse hopping windows with a 30-minute window, and a 30-minute period.
- DUse session windows with a 30-minute gap duration. (correct answer)
Reveal answer & explanationHide answer
Correct answer: D
The correct answer is D. Option D: Use session windows with a 30-minute gap duration. This option meets the real-time / low-latency performance requirement.