A = LOAD 'Batting.csv' USING PigStorage(',');
B = foreach A generate $0 as id:int,$1 as year:int,$8 as run:int;
C = FILTER B by year==1956;
但是DUMP C返回0條記錄。但是檔案中有1956年的記錄。 的樣本數據: playerID,yearID,st
下面是我的豬腳本。它非常簡單。加載一些數據。按列過濾數據。使用數據類型生成模式。將數據存儲在配置單元表中。 當我執行數據,其扔 emp = load '/root/emp.nulls' using PigStorage(',');
filt = filter emp by $2 is not null;
f = foreach filt generate $0 as id:int, $1 as