Ctrl+K
Logo image Logo image

Site Navigation

  • API Reference
  • Examples

Site Navigation

  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
  • PyFlink DataStream
    • StreamExecutionEnvironment
    • DataStream
    • Functions
    • State
    • Timer
    • Window
    • Checkpoint
    • Side Outputs
    • Connectors
    • Formats
  • PyFlink Common

pyflink.datastream.window.DynamicEventTimeSessionWindows#

class DynamicEventTimeSessionWindows(session_window_time_gap_extractor: pyflink.datastream.window.SessionWindowTimeGapExtractor)[source]#

A WindowAssigner that windows elements into sessions based on the timestamp of the elements. 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(DynamicEventTimeSessionWindows.with_dynamic_gap(extractor))

Methods

assign_windows(element, timestamp, context)

param element

The element to which windows should be assigned.

get_default_trigger(env)

param env

The StreamExecutionEnvironment used to compile the DataStream job.

get_window_serializer()

return

A TypeSerializer for serializing windows that are assigned by this WindowAssigner.

is_event_time()

return

True if elements are assigned to windows based on event time, false otherwise.

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.

previous

pyflink.datastream.window.DynamicProcessingTimeSessionWindows

next

pyflink.datastream.window.GlobalWindows

Show Source

Created using Sphinx 4.5.0.