I have a list of tuples, (String, String, Int, Double) that I want to convert to Spark RDD.
In general, how do I convert a Scala Iterable[(a1, a2, a3, ..., an)] into a Spark RDD?
I have a list of tuples, (String, String, Int, Double) that I want to convert to Spark RDD.
In general, how do I convert a Scala Iterable[(a1, a2, a3, ..., an)] into a Spark RDD?
There are a few ways to do this, but the most strait forward way is just to use Spark Context:
I think sc.Parallelize needs a conversion to List, but it will preserve your structure, thus you will still get a RDD[String,String,Int,Double]