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.
An e-commerce company is building a real-time analytics streaming pipeline in Apache Beam on Cloud Dataflow to process high-volume clickstream and transaction events from Pub/Sub.
The pipeline must fulfill the following architectural requirements:
Which combination of Apache Beam transformations, windowing strategies, triggers, and enrichment mechanisms should you implement?
This solution uses Apache Beam's native Sessions windowing, custom trigger composition, accumulation modes, and PCollectionView side inputs to build an adaptive, low-latency streaming pipeline.
Sessions.withGapDuration(Duration.standardMinutes(15)) defines data-driven windows that group user activity per key and close only after a 15-minute period of inactivity.AfterWatermark.pastEndOfWindow() trigger combined with .withEarlyFirings(...) and .withLateFirings(...) allows the pipeline to emit speculative results ahead of watermark completion and emit refined results when late data arrives..withAllowedLateness(Duration.standardHours(1)) retains window state for up to an hour after the watermark passes. Using accumulatingFiredPanes() ensures that subsequent late pane firings include previous data to provide updated cumulative totals.PCollectionView side input into a ParDo allows worker threads to perform in-memory lookups for store metadata against streaming elements without blocking stream consumption.This approach directly satisfies all session boundaries, handling of late-arriving data, and reference data enrichment requirements natively within the Beam execution model.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.