You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spark.apache.org by Hiral Mehta <hi...@gmail.com> on 2016/09/17 20:32:17 UTC

Fwd: Question regarding merging to two RDDs

Hi,

I have two separate csv files one with header and other with data. I read
those two files in 2 different RDDs and now I need to merge both the RDDs.

I tried various options such as union, zip, join but none worked for my
problem.
What is the best way to merge two RDDs so that the header and data are
merged into new RDD with header and data?

Thanks,
Hiral Mehta

Re: Fwd: Question regarding merging to two RDDs

Posted by WangJianfei <wa...@otcaix.iscas.ac.cn>.
maybe you can use dataframe ,with the header file as a schema 



--
View this message in context: http://apache-spark-developers-list.1001551.n3.nabble.com/Fwd-Question-regarding-merging-to-two-RDDs-tp18971p18977.html
Sent from the Apache Spark Developers List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe e-mail: dev-unsubscribe@spark.apache.org