map vs flatMap vs mapValues vs flatMapValues | Spark with Scala | Coding Interview questions

preview_player
Показать описание
Hi Friends,
Today I have explained about the transformations map, flatMap, mapValues and flatMapValues with sample Scala code.

Please subscribe to my channel and provide your feedback in the comments section.
Рекомендации по теме
Комментарии
Автор

Thank you very much! This was a very detailed explanation and helped me clear my doubts

ananthchief
Автор

Very well taught the key differences in one single video. Thank you.

shubhamdabra
Автор

Hi Sravana Lakshmi,

Can you please tell me how we can divide below multi delimited data
Range, 500|600|800
marks, 900|700|600

final result should be separated into 4 columns

normally its a "pipe delimiter" but first column merged with " , " it really helps me as it is frequently asked question in interviews

kakarlavinodreddy
Автор

I had this problem while trying to do the flatMapValues :

<console>:24: error: value flatMapValues is not a member of
val mvrdd = p.flatMapValues(a => (a to 12))


please help

yousfoss