I have a dataFrame
as below
-----------------------------
| A | B | C |
-----------------------------
| 1 | col_1 | val1 |
| 1 | col_2 | val2 |
| 1 | col_3 | val3 |
| 1 | col_4 | val4 |
-----------------------------
I need to convert this as below
-----------------------------------------------
| A | col_1 | col_2 | col_3 | col_4 |
-----------------------------------------------
| 1 | val1 | val2 | val3 | val4 |
-----------------------------------------------
How to do this using scala
+ spark-sql
? any clue is highly appreciated.