pyflink.datastream.data_stream.KeyedStream.filter#
- KeyedStream.filter(func: Union[Callable, pyflink.datastream.functions.FilterFunction]) pyflink.datastream.data_stream.DataStream [source]#
Applies a Filter transformation on a DataStream. The transformation calls a FilterFunction for each element of the DataStream and retains only those element for which the function returns true. Elements for which the function returns false are filtered.
- Parameters
func – The FilterFunction that is called for each element of the DataStream.
- Returns
The filtered DataStream.