Guest User

Untitled

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