Group unbounded streaming data into logical time intervals.
import apache_beam as beam
from apache_beam.transforms.window import FixedWindows, SlidingWindows, Sessions
# 1. Fixed Windows (non-overlapping)
fixed = stream | beam.WindowInto(FixedWindows(60))
# 2. Sliding Windows (overlapping)
sliding = stream | beam.WindowInto(SlidingWindows(60, 30))
# 3. Session Windows (activity gap-based)
sessions = stream | beam.WindowInto(Sessions(300))