spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ayan guha <guha.a...@gmail.com>
Subject Re: How to perform Join operation using JAVARDD
Date Mon, 19 Dec 2016 09:40:23 GMT
What's your desired output?
On Sat., 17 Dec. 2016 at 9:50 pm, Sree Eedupuganti <sree@inndata.in> wrote:

> I tried like this,
>
> *CrashData_1.csv:*
>
> *CRASH_KEY    CRASH_NUMBER      CRASH_DATE    CRASH_MONTH*
> *2016899114     2016899114                  01/02/2016           12:00:00
> AM +0000*
>
> *CrashData_2.csv:*
>
> *CITY_NAME    ZIPCODE             CITY                     STATE*
> *1945                 704               PARC PARQUE           PR*
>
>
> Code:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *JavaRDD<String> firstRDD =
> sc.textFile("/Users/apple/Desktop/CrashData_1.csv");*
>
> *JavaRDD<String> secondRDD =
> sc.textFile("/Users/apple/Desktop/CrashData_2.csv");*
>
> *JavaRDD<String> allRDD = firstRDD.union(secondRDD);*
>
>
> *Output i am getting:*
>
> *[CRASH_KEY,CRASH_NUMBER,CRASH_DATE,CRASH_MONTH,
> 2016899114,2016899114,01/02/2016 12:00:00 AM +0000 *
>
> *CITY_NAME,ZIPCODE,CITY,STATE, **1945,704,PARC PARQUE,PR]*
>
>
>
>
> *Any suggesttions please, Thanks in advance....*
>
>
>

Mime
View raw message