Grokbase Groups Pig user July 2011
FAQ
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

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 7 | next ›
Discussion Overview
groupuser @
categoriespig, hadoop
postedJul 19, '11 at 1:01p
activeJul 20, '11 at 6:00p
posts7
users4
websitepig.apache.org

People

Translate

site design / logo © 2022 Grokbase