Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig, mail # user - Ordering inside Bag


Copy link to this message
-
Ordering inside Bag
Mohit Anchlia 2012-04-19, 22:47
I have this output:
{(ST),(ZIP),(CITY),(NAM2)} {(NC),(28613),(Xxxxxxx),(Xxxxx X &xxx; Xxxxx X
Xxxxxx)}

{(NAM2),(ST),(ZIP),(CITY)} {(Xxxx X &xxx; Xxxxx X
Xxxxxx),(CO),(55555),(Xxxxxx)}

Above output is one to one logical mapping between 2 bags in the same row.
For eg: ST in one bag directly corresponds to NC in other bag. So this
means State = NC, ZIP = 28613

Is there a way to produce output in order ST,ZIP for instance. So in above
example final output would look like:

NC, 28613

CO, 55555