Please see this [1] [1] http://www.unmeshasreeveni.blogspot.in/2014/05/count-frequency-of-values-in-column.html
Regards Unmesha On Mon, May 19, 2014 at 10:06 AM, Cheolsoo Park <[email protected]>wrote: > You can group data by movie_id and then do distinct count the grouped bags > in nested foreach. > > > > > On Thu, May 15, 2014 at 12:54 PM, jamal sasha <[email protected]> > wrote: > > > Hi, > > > > My data is in format: > > > > user_id,movie_id,timestamp > > 123, abc,unix_timestamp > > 123, def, ... > > 123, abc, ... > > 234, sda, ... > > > > > > Now, I want to compute the number of times each movie is played in pig.. > > So the output I am expecting is: > > > > 123,abc,2 > > 123,def,1 > > 234,sda,1 > > > > and so on.. > > how do i do this in pig > > > -- *Thanks & Regards * *Unmesha Sreeveni U.B* *Hadoop, Bigdata Developer* *Center for Cyber Security | Amrita Vishwa Vidyapeetham* http://www.unmeshasreeveni.blogspot.in/
