+-+-++++
| name|otherName|val1|val2|val3|
+-+-++++
| bob| b1| 1| 2| 3|
|alive| c1| 3| 4| 6|
| eve| e1| 7| 8| 9|
+-+-++++
I need this to become
+-+-++-
| name|other
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
I'm trying to generate multiple rows from a single row
I have schema
Name Id Date 0100 0200 0300 0400
and would like to make it into a vertical format with schema
Name Id Date Time
I have the code below and get the error
Caused by: java.lang.RuntimeException:
org.apache.spark.sql.catalyst.ex