Watermarks
Revision GuideActive Topic
Cheatsheet: Watermarks
Recommended reading: 4 mins
Core Description
Track progress and event-time completeness in streaming pipelines.
TimestampedValue()
returns: TimestampedValuePurpose
Assigns event-time timestamps to elements before they enter temporal windows.
Syntax Signature
beam.window.TimestampedValue(value, timestamp)Usage Example
import apache_beam as beam
timestamped = records | "Add Timestamps" >> beam.Map(
lambda x: beam.window.TimestampedValue(x, x["epoch_time"])
)Used In
Reading elements from files or message fields lacking implicit timestamps.
Remember:
A Watermark is the runner's temporal completeness boundary; it guarantees that no elements with event-time t < T are expected.
More Free Data Engineering Cheatsheets (DataPlayArena)Interactive syntax references