Prepare and test your skills

Prepare and test your skills

Free sample question, answered and explained below. The Professional Data Engineer practice bank has 1,353 more like it. Try 10 free: instant score, no account.
A retail company is building a real-time analytics pipeline using Cloud Dataflow to analyze user interaction behavior on its mobile app. The application publishes user clickstream and checkout events to Cloud Pub/Sub with event timestamps embedded in the payload.
The pipeline must satisfy the following technical requirements:
Which windowing and triggering configuration should the team implement in Cloud Dataflow?
Session windowing divides streaming data into dynamic, data-driven time intervals that span periods of user activity separated by a specified inactivity gap. When combined with an allowed lateness policy and an accumulating trigger, Apache Beam/Dataflow holds window metadata in state storage to recalculate and emit updated aggregations whenever late data arrives before the expiration horizon.
Sessions.withGapDuration(Duration.standardMinutes(15)) ensures that consecutive events from a user occurring within 15 minutes of each other merge into a single continuous session window. The window terminates when no events occur for 15 minutes..withAllowedLateness(Duration.standardHours(1)) allows the pipeline to accept late-arriving events whose timestamps fall within closed session windows. The trigger firing on late events emits refined, accumulated totals across panes.Session windows are specifically designed for variable-length, user-centric activity patterns. Combining session windows with explicit event-time triggers and bounded allowed lateness optimizes both analytical accuracy and worker resource utilization.
Fixed windows (tumbling windows) divide an event stream into non-overlapping, contiguous time segments of uniform duration (such as [12:00–12:15), [12:15–12:30)). Processing-time triggers fire based on the worker clock rather than the event timestamp.
The pipeline needed simple batch-like streaming summaries, such as counting total incoming API requests per quarter-hour time block across the entire application fleet.
Sliding windows (or hopping windows) aggregate data over fixed-duration time intervals that overlap at regular, discrete periods (e.g., a 15-minute window computed every 1 minute).
discardingFiredPanes discards previously computed pane states upon triggering, preventing incremental cumulative updates when late data arrives.The requirement was to compute moving averages, such as calculating a 15-minute rolling average of active app users updated once every minute.
This configuration applies session windowing to group activity bursts based on a 15-minute inactivity gap, but leaves the pipeline's allowed lateness at its default setting of zero duration (Duration.ZERO).
The workload demanded strict zero-latency streaming where late data was irrelevant and state memory needed to be evicted immediately upon watermark passage.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated