I have a Dataset[String] and need to convert to a RDD[String]. How?
Note: I've recently migrated from spark 1.6 to spark 2.0. Some of my clients were expecting RDD but now Spark gives me Dataset.
As stated in the scala API documentation you can call .rdd
on your Dataset :
val myRdd : RDD[String] = ds.rdd
Dataset is a strong typed Dataframe, so both Dataset and Dataframe could use .rdd to convert to a RDD.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With