pyflink.datastream.data_stream.CachedDataStream.flat_map#
- CachedDataStream.flat_map(func: Union[Callable, pyflink.datastream.functions.FlatMapFunction], output_type: Optional[pyflink.common.typeinfo.TypeInformation] = None) pyflink.datastream.data_stream.DataStream #
Applies a FlatMap transformation on a DataStream. The transformation calls a FlatMapFunction for each element of the DataStream. Each FlatMapFunction call can return any number of elements including none.
- Parameters
func – The FlatMapFunction that is called for each element of the DataStream.
output_type – The type information of output data.
- Returns
The transformed DataStream.