spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aniket Bhatnagar <aniket.bhatna...@gmail.com>
Subject Re: Inserting an element in RDD[String]
Date Thu, 15 Jan 2015 14:29:52 GMT
Sure there is. Create a new RDD just containing the schema line (hint: use
sc.parallelize) and then union both the RDDs (the header RDD and data RDD)
to get a final desired RDD.

On Thu Jan 15 2015 at 19:48:52 Hafiz Mujadid <hafizmujadid00@gmail.com>
wrote:

> hi experts!
>
> I hav an RDD[String] and i want to add schema line at beginning in this
> rdd.
> I know RDD is immutable. So is there anyway to have a new rdd with one
> schema line and contents of previous rdd?
>
>
> Thanks
>
>
>
> --
> View this message in context: http://apache-spark-user-list.
> 1001560.n3.nabble.com/Inserting-an-element-in-RDD-String-tp21161.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
> For additional commands, e-mail: user-help@spark.apache.org
>
>

Mime
View raw message