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.CoMapFunction#

class CoMapFunction[source]#

A CoMapFunction implements a map() transformation over two connected streams.

The same instance of the transformation function is used to transform both of the connected streams. That way, the stream transformations can share state.

The basic syntax for using a CoMapFunction is as follows:

::
>>> ds1 = ...
>>> ds2 = ...
>>> new_ds = ds1.connect(ds2).map(MyCoMapFunction())

Methods

close()

map1(value)

This method is called for each element in the first of the connected streams.

map2(value)

This method is called for each element in the second of the connected streams.

open(runtime_context)

previous

pyflink.datastream.functions.MapFunction

next

pyflink.datastream.functions.FlatMapFunction

Show Source

Created using Sphinx 4.5.0.