pyflink.datastream.window.DynamicProcessingTimeSessionWindows#
- class DynamicProcessingTimeSessionWindows(session_window_time_gap_extractor: SessionWindowTimeGapExtractor)[source]#
A WindowAssigner that windows elements into sessions based on the current processing time. Windows cannot overlap.
For example, in order to window into windows with a dynamic time gap:
>>> data_stream.key_by(lambda x: x[0], key_type=Types.STRING()) \ ... .window(DynamicProcessingTimeSessionWindows.with_dynamic_gap(extractor))
Methods
assign_windows(element, timestamp, context)get_default_trigger(env)get_window_serializer()is_event_time()merge_windows(windows, callback)Determines which windows (if any) should be merged.
with_dynamic_gap(extractor)Creates a new SessionWindows WindowAssigner that assigns elements to sessions based on the element timestamp.