pyspark.streaming.DStream.flatMap

DStream.flatMap(f, preservesPartitioning=False)[source]

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