Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

I am preparing for HDPCD,. While practising Pig scripts, when I try the DUMP statement after the FILTER statement I get "ERROR 1003: Unable to find an operator for alias", Does anyone else face the similar issue (It's a non Java scripting).

Solved Go to solution

I am preparing for HDPCD,. While practising Pig scripts, when I try the DUMP statement after the FILTER statement I get "ERROR 1003: Unable to find an operator for alias", Does anyone else face the similar issue (It's a non Java scripting).

New Contributor
 
1 ACCEPTED SOLUTION

Accepted Solutions

Re: I am preparing for HDPCD,. While practising Pig scripts, when I try the DUMP statement after the FILTER statement I get "ERROR 1003: Unable to find an operator for alias", Does anyone else face the similar issue (It's a non Java scripting).

@Rashmi Gupta

There is a spelling mistake in your alias.

grunt> moive_rate = FILTER movie_a BY year==1994;
grunt> dump movie_rate;

When you assign you give that as moive_rate (Here the spelling is wrong for movie) whereas when you dump you give it as movie_rate.

Please try after correcting the spelling.

8 REPLIES 8

Re: I am preparing for HDPCD,. While practising Pig scripts, when I try the DUMP statement after the FILTER statement I get "ERROR 1003: Unable to find an operator for alias", Does anyone else face the similar issue (It's a non Java scripting).

I might be related to :

http://stackoverflow.com/questions/37685723/1003-error-unable-to-find-an-operator-for-alias-in-group...

If this does not help, can you post the commands you are trying and the stack trace to debug.

Re: I am preparing for HDPCD,. While practising Pig scripts, when I try the DUMP statement after the FILTER statement I get "ERROR 1003: Unable to find an operator for alias", Does anyone else face the similar issue (It's a non Java scripting).

New Contributor

Hi @Namit Maheshwari

Thanks for your response. I have placed the screenshots in the attached file, please have a look. It's a very simple FILTER command on a set of just 10 records.

pig-error1-hortonworks.png

Thanks,

Rashmi

Highlighted

Re: I am preparing for HDPCD,. While practising Pig scripts, when I try the DUMP statement after the FILTER statement I get "ERROR 1003: Unable to find an operator for alias", Does anyone else face the similar issue (It's a non Java scripting).

Rashmi your screenshot is not very readable.

Can you type the script you are trying to run below?

Re: I am preparing for HDPCD,. While practising Pig scripts, when I try the DUMP statement after the FILTER statement I get "ERROR 1003: Unable to find an operator for alias", Does anyone else face the similar issue (It's a non Java scripting).

New Contributor

Hi Namit,

Data is ;

(1,NightmareBeforeChristmas,1993,3.9,4568)

(2,TheMummy,1932,3.5,4388)

(3,OrphansoftheStorm,1921,3.2,9062)

(4,TheObjectofBeauty,1991,2.8,6150)

(5,NightTide,1963,2.8,5126)

(6,OneMagicChristmas,1985,3.8,5333)

(7,MurielsWedding,1994,3.5,6323)

(8,MothersBoys,1994,3.4,5733)

(9,NosferatuOriginalVersion,1929,3.5,5651)

(10,NickofTime,1995,3.4,5333)

Code is;

movie_a = LOAD '/root/horton/movie_rev.txt' USING PigStorage(',') as (id:int ,name:chararray ,year:int ,rating:float ,duration:int);

grunt> moive_rate = FILTER movie_a BY year==1994;

grunt> dump movie_rate;

Error is;

2017-04-29 07:57:48,709 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1003: Unable to find an operator for alias movie_rate

Re: I am preparing for HDPCD,. While practising Pig scripts, when I try the DUMP statement after the FILTER statement I get "ERROR 1003: Unable to find an operator for alias", Does anyone else face the similar issue (It's a non Java scripting).

New Contributor

Thanks a lot Namit. I didn't realised I am doing such a silly mistake. it's working now. thanks again.

Re: I am preparing for HDPCD,. While practising Pig scripts, when I try the DUMP statement after the FILTER statement I get "ERROR 1003: Unable to find an operator for alias", Does anyone else face the similar issue (It's a non Java scripting).

@Rashmi Gupta

There is a spelling mistake in your alias.

grunt> moive_rate = FILTER movie_a BY year==1994;
grunt> dump movie_rate;

When you assign you give that as moive_rate (Here the spelling is wrong for movie) whereas when you dump you give it as movie_rate.

Please try after correcting the spelling.

Re: I am preparing for HDPCD,. While practising Pig scripts, when I try the DUMP statement after the FILTER statement I get "ERROR 1003: Unable to find an operator for alias", Does anyone else face the similar issue (It's a non Java scripting).

Hi Rashmi, Can you please accept my answer, if it helped you to resolve the issue.

Re: I am preparing for HDPCD,. While practising Pig scripts, when I try the DUMP statement after the FILTER statement I get "ERROR 1003: Unable to find an operator for alias", Does anyone else face the similar issue (It's a non Java scripting).

New Contributor

Hi Namit, Ahh, thanks a lot.. such a silly mistake... it's working now. Thanks again.

Rashmi