My current table structure has the following columns:
id, name, height, weight
I need to un-pivot it so that a single id
will have 2 entries - one for height and one for weight. The query would be like this in Hive:
select id, name, "height" attribute, height as value
from table1
union all
select id, name, "weight" attribute, height as value
from table1
How do I do this in Pig?