Is there a way in Hive to unpivot a table, making the column names into rows themselves?
I have a table like this.
Col1 | Col2 | Col3
X1 | Y1 | Z1
X2 | Y2 | Z2
X3 | Y3 | Z3
I need it to be unpivoted into something like this.
Col1 | X1
Col2 | Y1
Col3 | Z1
Col1 | X2
Col2 | Y2
Col3 | Z2
Can it be achieved using hive? Please help.