Commit 73aef15d authored by leroyq's avatar leroyq

usecase1-ex1

parent 5b1e0f13
-- Load input data from local input directory
A = LOAD '/laboratory/tstat-sample.txt' using PigStorage(' ') AS (ip_c:chararray, ….);
-- Group by client IP
B = GROUP A BY ip_c PARALLEL 10;
-- Generate the output data
C = FOREACH B GENERATE group, COUNT(A);
EXPLAIN C;
-- Store the output (and start to execute the script)
STORE C INTO '/pig/local-output/use-case1/ex1';
-- Load input data from local input directory
A = LOAD '/laboratory/tstat-sample.txt' using PigStorage(' ') AS (ip_c:chararray, ….);
-- Group by client IP
B = GROUP A BY ip_c;
-- Generate the output data
C = FOREACH B GENERATE group, COUNT(A);
-- Store the output (and start to execute the script)
STORE C INTO '/pig/local-output/use-case1/ex1';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment