Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- movies_data = LOAD '/movies_data' using PigStorage(',') as (id:chararray,title:chararray,year:int,rating:double,duration:double);
- high = FILTER movies_data by rating > 4.0;
- high_rated = FOREACH high GENERATE movies_data.title,movies_data.year,movies_data.rating,movies_data.duration;
- DUMP high_rated;
- 2018-07-22 20:11:07,213 [main] ERROR org.apache.pig.tools.grunt.Grunt
- ERROR 1066: Unable to open iterator for alias high_rated.
- Backend error : org.apache.pig.backend.executionengine.ExecException:
- ERROR 0: Scalar has more than one row in the output.
- 1st : (1,The Nightmare Before Christmas,1993,3.9,4568.0),
- 2nd :(2,The Mummy,1932,3.5,4388.0)
- (common cause: "JOIN" then "FOREACH ... GENERATE foo.bar" should be "foo::bar" )
Add Comment
Please, Sign In to add comment