I think the title pretty much sums up what I am trying to do here. I have the following piece of code
implicit val sc: SparkContext = spark.sparkContext
val result = RDD[RDD[GenericRecord]] = sc.parallelize(dates).map { date =>
val foo: RDD[GenericRecord] = readSomething(...)
foo
}
I want to convert result to an RDD of GenericRecord but foo is not Traversable so that I can use flatMap. Any ideas here?