0
votes

I have simplified the problem further and here are the details:

in1.txt:

null null <=6.9
null null <7.0

in2.txt:

null null <=6.9null 
not-null <=6.9
null null <7.0
not-null null <7.0

    in1 = LOAD 'in1.txt' AS (f1:chararray, f2:chararray, f3:chararray);
    DUMP in1;

I see the following: Not sure why there are additional empty fields!

(null null <=6.9,,)
(null not-null <=6.9,,)
(null null <7.0,,)
(not-null null <7.0,,)

in2 = LOAD 'in2.txt' AS (a1:chararray, a2:chararray, a3:chararray);
DUMP in2;

I see the following: Not sure why there are additional empty fields!

(null null <=6.9 ,,)
(null null <7.0 ,,)

ins_joined = JOIN in1 BY(f1,f2,f3), in2 BY (a1,a2,a3);
DUMP ins_joined;

I also tried

this:ins_joined_one = JOIN in1 BY(f1), in2 BY (a1);
DUMP ins_joined_one;
DUMP ins_joined_one is also empty!

Relation ins_joined is empty. Not sure what is going on. Would really appreciate the help.

2

2 Answers

0
votes

Your data is not loaded properly, all the datas are loaded into single column and the remaining columns are empty, you need to load your data like this

in1 = LOAD 'in1.txt' USING PigStorage(' ') AS (f1:chararray, f2:chararray, f3:chararray);
in2 = LOAD 'in2.txt' USINg PigStorage(' ') AS (a1:chararray, a2:chararray, a3:chararray);
0
votes

Yes, it was an issue with the data load. It is working fine now with the same pig script.....