我的命令是为下: Z = LOAD '/..file_path' USING PigStorage(',') AS (name:CHARARRAY,gpa:int,salary:int);
y = GROUP Z BY gpa;
R = FOREACH y GENERATE SUM(Z.salary);
我得到的 DUMP R;
输出为: {all,()};
请指导我。 TIA。
猪脚本中是否有使用这种语法的方法? 命令: /* some pig latin code here */
mv /user/test/folder_pattern* /path/to/move
/* some pig latin code here */
错误: [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2997: En
我正在运行此配置单元查询以获得非结构化数据上的单词明智数。 select a, count(*) from (select(EXPLODE(SPLIT(regexp_replace(upper(word,'[[email protected]#$%&*]',''))) AND EXPLODE(SPLIT(regexp_replace(UPPER(word,'[^A-Za-z0-9 ]','')))
袋子上用枚举 我尝试使用下面的代码来枚举袋: DEFINE Enumerate datafu.pig.bags.Enumerate('1');
group = GROUP data1
By (query_text);
ranked = FOREACH group {
ordered = ORDER data1 BY score DESC;