Hello,

I want to use foreach statement to filter the tuple in the bag. But it
didn't work. My pig-code is as follows:

A = LOAD '/home/test/student.txt' AS (name:chararray, no:int, score: int);
B = GROUP A BY no;
C =  FOREACH B {
    D = FILTER A BY A.score > 80;
    GENERATE D.name, D.score;}
DUMP C;

It always returns
2011-07-19 14:50:20,329 [main] ERROR org.apache.pig.impl.plan.OperatorPlan -
Attempt to connect operator D: Filter 1-87 which is not in the plan.
2011-07-19 14:50:20,332 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 2219: Unable to process scalar in the plan

How can I fix it?

Thanks

Yong

Reply via email to