thanks
On Thu, Jan 15, 2015 at 7:35 PM, Prannoy [via Apache Spark User List] <
ml-node+s1001560n21163...@n3.nabble.com> wrote:
> Hi,
>
> You can take the schema line in another rdd and than do a union of the two
> rdd .
>
> List schemaList = new ArrayList;
> schemaList.add("xyz");
>
> // where xy
Hi,
You can take the schema line in another rdd and than do a union of the two
rdd .
List schemaList = new ArrayList;
schemaList.add("xyz");
// where xyz is your schema line
JavaRDD schemaRDD = sc.parallize(schemaList) ;
//where sc is your sparkcontext
JavaRDD newRDD = schemaRDD.union(yourRD
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
wrote:
> hi experts!
>
> I hav an RDD[String] and i want to add schema li