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

Switch to Plain View
Pig >> mail # user >> SUM of project-range of fields?


+
Nathan Neff 2013-03-10, 14:45
Copy link to this message
-
Re: SUM of project-range of fields?
Try:

movie_and_genres = FOREACH movies GENERATE $0,
(b:bag{t:tuple(i:int)})TOBAG($2 ..) AS genres:b:bag{t:tuple(i:int)};
foo = foreach movies_and_genres generate SUM(genres) as genre_total;
Russell Jurney http://datasyndrome.com

On Mar 10, 2013, at 7:45 AM, Nathan Neff <[EMAIL PROTECTED]> wrote:

> movie_and_genres = FOREACH movies GENERATE $0, TOBAG($2 ..) AS genres;
+
Nathan Neff 2013-03-19, 01:15
+
Nathan Neff 2013-03-19, 01:50
+
Abhinav Neelam 2013-03-19, 17:43
+
Nathan Neff 2013-03-19, 20:16