Latent Tendencies
Join me on an adventure to explore life.
Wednesday, August 14, 2013
Word Count In Pig
Figuring out Github. Will post the code there once its done. :)
A = LOAD 'Nameipfile' using TextLoader();
B = FOREACH A GENERATE FLATTEN(TOKENIZE($0)) as word;
C= FOREACH ( GROUP B by word ) GENERATE, GROUP as word, COUNT($1) as ct;
Dump C;
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment