我得到:
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: Unable to open iterator for test
当我有代码时:
my_file = LOAD '$my_records_file' USING PigStorage('\t') AS (field0:chararray, field1:int);
test = FILTER my_file BY field0 != null;
为什么会出现此错误?
最佳答案
我想您想过滤具有空值的行? 语法是 field0 IS NOT NULL。
my_file = LOAD '$my_records_file' USING PigStorage('\t') AS (field0:chararray, field1:int);
test = FILTER my_file BY field0 IS NOT NULL;
但是如果你想过滤值为空的行,代码是:
my_file = LOAD '$my_records_file' USING PigStorage('\t') AS (field0:chararray, field1:int);
test = FILTER my_file BY field0 !='null';
关于hadoop - pig 错误 1066 : Unable to open iterator for alias test,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24515745/