pyflink.datastream.functions.FlatMapFunction#
- class FlatMapFunction[source]#
Base class for flatMap functions. FlatMap functions take elements and transform them, into zero, one, or more elements. Typical applications can be splitting elements, or unnesting lists and arrays. Operations that produce multiple strictly one result element per input element can also use the MapFunction. The basic syntax for using a MapFUnction is as follows:
- ::
>>> ds = ... >>> new_ds = ds.flat_map(MyFlatMapFunction())
Methods
close
()flat_map
(value)The core mthod of the FlatMapFunction.
open
(runtime_context)