Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi Community,
Can you please share any thought you have for the below requirement.
I have 2 tables,
1.
Table1:
Dim1,Dimx,Dixy,Join_key;
2.
Dim2,Column1,Colmn2,if(Dim1=Dim2,1,0) as Complex_Key,Join_key;
in the 2nd tab I have two create Complex_Key based on table1,
can you please share your thoughts.
it is not possible to have Exist function.
-Priya
May be like this
LOAD * From Table1;
LOAD *,
If(LookUp('Dim1','Join_Key',Join_Key,'Table1')=Dim2,1,0) as Complex_key
From Table2;
You can use exist function too I guess. However, to create Complex_Key, you have to load the table for one extra time and that too after the join has already happened. In other words, first join the tables, then create the new field in another load using resident load of the joined table.
exist will check all the values but here it is '=', so exist cannot be used
If you want to just create a flag, then exist() won't help. Exist() could help you if you want to discard few values being loaded.
May be like this
LOAD * From Table1;
LOAD *,
If(LookUp('Dim1','Join_Key',Join_Key,'Table1')=Dim2,1,0) as Complex_key
From Table2;