Control exactly when window results are materialized and sent downstream.
from apache_beam.transforms.trigger import AfterWatermark, AfterCount, Repeatedly
from apache_beam.transforms.trigger import AccumulationMode
triggered = elements | beam.WindowInto(
beam.transforms.window.FixedWindows(60),
trigger=Repeatedly(AfterWatermark(
early=AfterCount(10),
late=AfterCount(1)
)),
allowed_lateness=1800,
accumulation_mode=AccumulationMode.ACCUMULATING
)