Question
What does flatMap do on an RDD?
Select an option. Your answer will be checked instantly.
Correct Answer: B. Produces zero or more output elements per input and flattens them
Explanation:
flatMap is useful for expanding records, such as splitting lines into words.
Empty outputs can also remove records.
Leave a Reply