0

I have the input as mentioned below and output as mentioned below. May I know if any one has written transpose in hive.

Input:

id  street  seqnbr
100 nj  1
100 ca  2
100 ny  3
100 va  4

As per the sequence number , the street will go to st1, st2 respectively.

Output:

id     st1  st2 st3 st4
100    nj   ca  ny  va
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
user3858193
  • 1,320
  • 5
  • 18
  • 50
  • Possible duplicate of [Is there a way to transpose data in Hive?](http://stackoverflow.com/questions/18624991/is-there-a-way-to-transpose-data-in-hive) – OneCricketeer Oct 22 '15 at 22:29
  • Possible duplicate of [Pivot a multiple rows into one row with multiple columns (like reshape cast in R)](http://stackoverflow.com/questions/26920309/pivot-a-multiple-rows-into-one-row-with-multiple-columns-like-reshape-cast-in-r) – o-90 Oct 23 '15 at 04:37
  • Possible duplicate of [How to transpose/pivot data in hive?](http://stackoverflow.com/questions/23025380/how-to-transpose-pivot-data-in-hive) – Dennis Jaheruddin Aug 13 '16 at 07:22

0 Answers0