What is difference between map and flatmap?



What is difference between map and flatmap?..

Answer / Rajeev Yadav

In Apache Spark, Map transforms each input element into a key-value pair, while FlatMap transforms each input element into zero or more output elements.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apache Spark Interview Questions

Do we need to install scala for spark?

1 Answers  


explain the concept of RDD (Resilient Distributed Dataset). Also, state how you can create RDDs in Apache Spark.

1 Answers  


What is aggregatebykey spark?

1 Answers  


What is shark?

1 Answers  


How do I change hive execution engine to spark?

1 Answers  


What is dataproc cluster?

1 Answers  


What is Apache Spark Machine learning library?

1 Answers  


Is apache spark going to replace hadoop?

1 Answers  


What is difference between dataset and dataframe in spark?

1 Answers  


What is pair rdd in spark?

1 Answers  


What are the various libraries available on top of Apache Spark?

1 Answers  


What is the difference between dataframe and dataset in spark?

1 Answers  


Categories