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 financial analytics company processes millions of real-time point-of-sale transactions using an Apache Beam pipeline running on Google Cloud Dataflow. The pipeline ingests transactions from Cloud Pub/Sub and calculates aggregated financial metrics per merchant across 1-hour event-time windows.
The engineering team has identified the following requirements:
Which pipeline design pattern should the team implement?
In Apache Beam and Google Cloud Dataflow, managing late-arriving data requires orchestrating event-time windowing, watermark tracking, allowed lateness, and triggers. This solution configures 1-hour fixed windows with an explicit allowed lateness of 2 hours, enables late pane emissions via triggers, and routes data that arrives past the allowed lateness threshold to a dead-letter side output.
.withAllowedLateness(Duration.standardHours(2)) instructs Dataflow to keep the window state active for 2 hours after the watermark passes the end of the window. When late data arrives, the AfterWatermark.pastEndOfWindow() trigger fires late panes with accumulatingFiredPanes(), producing updated aggregate totals for the merchant.window_end + allowed_lateness), Dataflow automatically closes and garbage-collects the window state, bounding state memory and preventing resource exhaustion.DoFn with a TupleTag (or using Beam's dropped data side output), routing those elements to Cloud Storage for offline reprocessing.window_end + allowed_lateness, reclaiming state storage across Dataflow workers.accumulatingFiredPanes() ensures each late trigger emission reflects both on-time and late data.This approach directly balances computation accuracy, pipeline operational stability, and cost efficiency. It avoids unbounded state retention while providing a resilient audit trail for out-of-order stragglers.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.