I have Hive table with primitive data types like this:
CustomerName|City|Product1|RatingByMe|RatingByOthers|Product2|RatingByMe|RatingByOthers
I wish to convert it to complex data types with 2 separate lines for 2 products and having this schema:
CustomerName|City|Product1|struct[RatingByMe,RatingByOthers]
CustomerName|City|Product2|struct[RatingByMe,RatingByOthers]
How can achieve this in Hive? Any leads would be appreciated.