Creating a table with different structure from an existing table.

I have a hive table with following structure,
Date ID Col1 Col1_Value Col2 Col2_Value
22-12-2018 1 X 25 Y 45
22-12-2018 2 Y 45 Z 15
I want to convert this to ,
Date ID Col Col_Value
22-12-2018 1 X 25
22-12-2018 1 Y 45
22-12-2018 2 Y 45
22-12-2018 2 Z 15

How can i do this Hive. Can anybody please give me an idea to solve this?
Thanks in advance.

Tagged:
Sign In or Register to comment.