virt2/assets/vendor_plugins/ace-builds-master/demo/kitchen-sink/docs/pig.pig

10 lines
277 B
Pig
Raw Permalink Normal View History

A = load 'mobydick.txt';
B = foreach A generate flatten(TOKENIZE((chararray)$0)) as word;
C = filter B by word matches '\\w+';
D = group C by word;
E = foreach D generate COUNT(C) as count, group as word;
F = order E by count desc;
-- one comment
/* another comment */
dump F;