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

Switch to Threaded View
Pig >> mail # user >> Counting tuple elements


Copy link to this message
-
Counting tuple elements
Say I have a tuple containing the following elements (Apples, Apples,
Oranges, Carrots, Carrots)

Is it possible in pig to find the counts of the tuple, for example the
output I would like is:

(Apples, 2)
(Oranges, 1)
(Carrots, 2)

Thanks,
James