猪脚本输出

时间:2017-12-08 17:22:56

标签: apache-pig

我是猪脚本的新手并且遇到了以下的猪脚本。我理解前两行,但我没有从" C = B组获得清晰度。"有人可以解释一下代码吗?

A = LOAD ’page views’ AS (user, action, timespent, query term, ip addr, 
timestamp,estimated revenue, page info, page links);
B = FOREACH A generate user, estimated revenue;
C = GROUP B by user parallel 40;
D = FOREACH C
     E = ORDER B by estimated revenue;
     F = E.estimated revenue;
     GENERATE group, SUM(F);
ENDFOR
STORE D into ’L16out’;

提前致谢。

0 个答案:

没有答案