professional-cloud-data-engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
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.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.