pyflink.datastream.functions.MapFunction#
- class MapFunction[source]#
Base class for Map functions. Map functions take elements and transform them, element wise. A Map function always produces a single result element for each input element. Typical applications are parsing elements, converting data types, or projecting out fields. Operations that produce multiple result elements from a single input element can be implemented using the FlatMapFunction. The basic syntax for using a MapFunction is as follows:
- ::
>>> ds = ... >>> new_ds = ds.map(MyMapFunction())
Methods
close
()map
(value)The mapping method.
open
(runtime_context)