Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 9ac536d36d
Fetching contributors…

Cannot retrieve contributors at this time

44 lines (43 sloc) 0.988 kb
-- == join_dump
-- == join_join
-- == join_left_outer
-- == join_cogroup
-- == join_cogroup_inner
-- == join_cogroup_flatten
-- == join_cogroup_join
A = LOAD 'input/pig/join/A' AS (id:int, name:chararray);
B = LOAD 'input/pig/join/B' AS (name:chararray, id:int);
-- vv join_dump
DUMP A;
DUMP B;
-- ^^ join_dump
-- vv join_join
C = JOIN A BY $0, B BY $1;
DUMP C;
-- ^^ join_join
-- vv join_frj
C = JOIN A BY $0, B BY $1 USING "replicated";
-- ^^ join_frj
-- vv join_left_outer
C = JOIN A BY $0 LEFT OUTER, B BY $1;
DUMP C;
-- ^^ join_left_outer
-- vv join_cogroup
D = COGROUP A BY $0, B BY $1;
DUMP D;
-- ^^ join_cogroup
-- vv join_cogroup_inner
E = COGROUP A BY $0 INNER, B BY $1;
DUMP E;
-- ^^ join_cogroup_inner
-- vv join_cogroup_flatten
F = FOREACH E GENERATE FLATTEN(A), B.$0;
DUMP F;
-- ^^ join_cogroup_flatten
-- vv join_cogroup_join
G = COGROUP A BY $0 INNER, B BY $1 INNER;
H = FOREACH G GENERATE FLATTEN($1), FLATTEN($2);
DUMP H;
-- ^^ join_cogroup_join
I = CROSS A, B;
DUMP I;
Jump to Line
Something went wrong with that request. Please try again.