spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nookala <srinook...@gmail.com>
Subject RE: Split a row into multiple rows Java
Date Wed, 01 Aug 2018 20:05:12 GMT
Pivot seems to do the opposite of what I want, convert rows to columns.

I was able to get this done in python, but would like to do this in Java

idfNew = idf.rdd.flatMap((lambda row: [(row.Name, row.Id, row.Date,
"0100",row.0100),(row.Name, row.Id, row.Date, "0200",row.0200),row.Name,
row.Id, row.Date, "0300",row.0300),row.Name, row.Id, row.Date,
"0400",row.0400)])).toDF()



--
Sent from: http://apache-spark-user-list.1001560.n3.nabble.com/

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


Mime
View raw message