pyspark.streaming.DStream.flatMap

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

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