Skip to main content
Ctrl+K
PyFlink 1.20+vvr.11.7.dev0 documentation - Home PyFlink 1.20+vvr.11.7.dev0 documentation - Home
  • API Reference
  • Examples
  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
  • PyFlink DataStream
    • StreamExecutionEnvironment
    • DataStream
    • Functions
    • State
    • Timer
    • Window
    • Checkpoint
    • Side Outputs
    • Asynchronous I/O
    • Connectors
    • Formats
  • PyFlink DataFrame
  • PyFlink Common
  • API Reference
  • PyFlink DataStream
  • Functions
  • pyflink.datastream.functions.CoMapFunction

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

On this page
  • CoMapFunction

This Page

  • Show Source

Created using Sphinx 7.4.7.

Built with the PyData Sphinx Theme 0.16.1.