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
I have this output:
{(ST),(ZIP),(CITY),(NAM2)} {(NC),(28613),(Xxxxxxx),(Xxxxx X &xxx; Xxxxx X

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

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