The below code will have an extra row on ID E with value 8 .
By using where not exist this row should not be loaded. I want to know why it will load. I have a hypothesis but not sure about that.
T1:LOAD * Inline [
ID, brand, valueA , abc , 5B, XYZ , 6C , XYZ , 7C , abc, 8];
T2:load ID1 as ID ,brand , value ;
LOAD * Inline [
ID1 , brand , valueA , abc , 500B, pqr , 6E , XYZ, 70000E , abc , 8// will be loaded why?] where not Exists(ID,ID1 ) ;
ID1 has not been renamed to ID, so the value 'E' does not exist in filed ID and both records are loaded. If you move the test to
Load ID1 as ID, brand, value
where not Exists (ID,ID1);
you will get the results that you expect.
View solution in original post