Guest User

Untitled

a guest
Jun 21st, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 0.35 KB | None | 0 0
  1. Example OF using maps IN apache pig
  2.  
  3. grunt> sh cat t.txt
  4. /abc.html       [google.com#10,yahoo.com#20]
  5. /def.html       [bing.com#20,yahoo.com#5]
  6.  
  7. grunt> l = load 't.txt' AS (url, source_referals : map [ ]);
  8. grunt> f = foreach l generate url, source_referals#'yahoo.com', source_referals#'google.com';
  9. grunt> DUMP f;
  10. (/abc.html,20,10)
  11. (/def.html,5,)
Add Comment
Please, Sign In to add comment