hadoop - pig 错误 1066 : Unable to open iterator for alias test

标签 hadoop mapreduce apache-pig

我得到:

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/

相关文章:

scala - Spark - 使用 BytesWritable 类型按键排序

hadoop - canopy聚类算法中如何增加reducer的数量

java - 我可以输出键/值对,这样一个键特定于 Hadoop MapReduce 中的一个节点吗?

hadoop - MapReduce 中间数据输出位置

hadoop - 如果创建一个包含 300 个列族的 hbase 表就可以了?

hadoop - 将分区的数据插入分区的配置单元表

mysql - hadoop会比mySQL更快吗

hadoop - 运行 pig 脚本给出错误 : job has failed. Stop running all dependent jobs

hadoop - Hadoop MapReduce wordcount教程错误:输入路径不存在

hadoop - Apache Pig中的区间相交