pyspark.streaming.DStream.flatMap

DStream.flatMap(f: Callable[[T], Iterable[U]], preservesPartitioning: bool = False) → pyspark.streaming.dstream.DStream[U][source]

Return a new DStream by applying a function to all elements of this DStream, and then flattening the results