- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
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).
- Labels:
-
Apache Pig
Created ‎04-28-2017 08:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created ‎04-29-2017 05:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created ‎04-28-2017 10:33 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I might be related to :
If this does not help, can you post the commands you are trying and the stack trace to debug.
Created ‎04-29-2017 08:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Thanks,
Rashmi
Created ‎04-29-2017 10:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rashmi your screenshot is not very readable.
Can you type the script you are trying to run below?
Created ‎04-29-2017 04:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Created ‎04-29-2017 05:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot Namit. I didn't realised I am doing such a silly mistake. it's working now. thanks again.
Created ‎04-29-2017 05:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created ‎04-29-2017 05:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rashmi, Can you please accept my answer, if it helped you to resolve the issue.
Created ‎04-29-2017 05:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Namit, Ahh, thanks a lot.. such a silly mistake... it's working now. Thanks again.
Rashmi