Skip to content

Instantly share code, notes, and snippets.

@abshingate
Last active December 19, 2015 10:58
Show Gist options
  • Save abshingate/5943917 to your computer and use it in GitHub Desktop.
Save abshingate/5943917 to your computer and use it in GitHub Desktop.
wordcount.pig
A = load 'src/main/resources/sample.data';
B = foreach A generate flatten(TOKENIZE((chararray)$0)) as word;
C = group B by word;
D = foreach C generate COUNT(B), group;
dump D;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment