Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Pig Code to use UDF of accumulator interface
raw_data = load 'data' using ... as (model:chararray, ctr:double, clicks:int);
A = FOREACH raw_data GENERATE model as model, ctr as pctr, ((clicks > 0) ? 1 : 0) as clicked;
B = GROUP A by model;
D = ORDER A by pctr asc;
STORE C INTO 'xxxx';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment