apache pig - How to load data from the output of mapreduce part-r to Pig or Hive -
i have data generated part r mapreduce job in following format:
(19,[2468:5.0,1894:5.0,3173:5.0,3366:5.0,3198:5.0,1407:5.0,407:5.0,1301:5.0,2153:5.0,3007:5.0]) (20,[3113:5.0,3285:5.0,3826:5.0,3755:5.0,373:5.0,3510:5.0,3300:5.0,22:5.0,1358:5.0,3273:5.0])
19 , 20 users ids , array within [] recommendations users, each recommendation separated comma. want load data in tabular format - row 1 =19,2468,5.0,3175, row 2 = 19, 1894, 5.0, 3173 , on.
how achieve pig or hive?
so far, have tried in pig haven't been able parse desired output.
i looking create report can display user name (by joining user table), recommended movie names user (by joining movie table) , user rating.
in data above, 19 user id. within parentheses recommended movie ids user along rating. each recommendation separated comma.
Comments
Post a Comment