Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Example OF using maps IN apache pig
- grunt> sh cat t.txt
- /abc.html [google.com#10,yahoo.com#20]
- /def.html [bing.com#20,yahoo.com#5]
- grunt> l = load 't.txt' AS (url, source_referals : map [ ]);
- grunt> f = foreach l generate url, source_referals#'yahoo.com', source_referals#'google.com';
- grunt> DUMP f;
- (/abc.html,20,10)
- (/def.html,5,)
Add Comment
Please, Sign In to add comment