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, 08 Aug 2018 03:40:58 GMT
+-----+---------+----+----+----+
| 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|otherName|time|value
+-----+---------+----+---------
|  bob|       b1|   val1|    1
|  bob|       b1|   val2|    2
|  bob|       b1|   val3|    3
|alive|       c1|   val1|     3
|alive|       c1|   val2|     4
|alive|       c1|   val3|     6
|  eve|       e1|   val1|    7
|  eve|       e1|   val2|    8
|  eve|       e1|   val3|    9
+-----+---------+----+-----



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

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


Mime
View raw message