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.functions.ProcessFunction#

class ProcessFunction[source]#

A function that process elements of a stream.

For every element in the input stream process_element(value, ctx, out) is invoked. This can produce zero or more elements as output. Implementations can also query the time and set timers through the provided Context. For firing timers on_timer(long, ctx, out) will be invoked. This can again produce zero or more elements as output and register further timers.

Note that access to keyed state and timers (which are also scoped to a key) is only available if the ProcessFunction is applied on a KeyedStream.

Methods

close()

open(runtime_context)

process_element(value, ctx)

Process one element from the input stream.

previous

pyflink.datastream.functions.AggregateFunction

next

pyflink.datastream.functions.KeyedProcessFunction

Show Source

Created using Sphinx 4.5.0.