|| at Oct 14, 2009 at 7:00 pm
Make sure A and B contain what you think they contain (use the 'dump'
command to view them inside the shell).
Are you sure the input files are delimited by tabs?
I ran your script and got the expected results:
grunt> a = load '/tmp/1.txt' as (a1,a2);
grunt> b = load '/tmp/2.txt' as (a1,a2);
grunt> ret = JOIN a by a1 LEFT OUTER, b by a1;
grunt> dump a;
grunt> dump b;
grunt> dump ret;
grunt> store ret into '/tmp/res';
dvryaboy@abacus:~/src/pig$ cat /tmp/res
a 1 a aa
c 3 c cc
On Wed, Oct 14, 2009 at 2:48 PM, Yonggang Qiao wrote:
new to pig, I want to do an out join using pig, but cannot the result
I want. did I do something wrong?
A = LOAD '1.txt' USING PigStorage('\t') as (a1,a2);
B = LOAD '2.txt' USING PigStorage('\t') as (a1,a2);
ret = JOIN A by a1 LEFT OUTER, B BY a1;
STORE ret INTO 'result';
but the result is
the result from 2.txt is somehow missing...
Thanks in advance!