我的命令是爲下: 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;