I have a RDD which is of the form
org.apache.spark.rdd.RDD[(String, Array[String])]
I want to write this into a csv file. Please suggest m
You can try:
myrdd.map(a => a._1 + "," + a._2.mkString(",")).saveAsTextFile