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