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)