How Do I transpose columns and rows in PIG
问题 I'm not sure if this can be done with builtin PIG scripts or I'll need to code a UDF. But I have essentially a table where I simply want to transpose the data. Simple put, given: (1, 2, 3, 4, 5) (6, 7, 8, 9, 10) (11, 12, 13, 14, 15) ... 300 plus more tuples I would end up with: (1,6,11,...) -> goes on for a few hundred more (2,7,12,...) (3,8,13,...) (4,9,14,...) (5,10,15,...) Any suggestions on how I could accomplish this? 回答1: This is not possible with Pig, nor does it make much sense for it