A very common, error message in Apache Pig is:
ERROR 1066: Unable to open iterator for alias
There are several questions where t
The message "ERROR 1066: Unable to open iterator for alias myAlias" suggests that there is something going wrong in the line where you use myAlias.
However, usually you will see this error if something went wrong BEFORE you are trying to use this alias. So the first thing to do is look up further along the error message, and see whether this is truely the first error that is thrown.
Here is what I found to be an efficient way to deal with this error when I did not easily spot an earlier error:
Notes:
pig
or pig -useHCatalog
for example)I once received this error when using the SUM function. I was summing values that had nulls among them. After filtering out the null values in the prior lines, it worked properly.