Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'd like to make a multiple condition join with a t Map. I have an input source data which contains 4 possibles values for a field.
I'd like to join the two when one of the main data match one of the lookup data.
In SQL that would be something like : left join table B ON (A.bar1=B.bar1 or A.bar1=B.bar2 or A.bar2=B.bar1 or A.bar2=B.bar2)
Thanks.
Hi Arun,
If you have 2 input sources - Main table and Look-up table which is connected to tMap,
You can find tMap settings at look-up table header in tMap - Join Model: Inner Join /Left Outer Join.
Hello,
Please also take a look at this community article about:https://community.talend.com/t5/Design-and-Development/tMap-expression-syntax/ta-p/21575
Best regards
Sabrina
Hello arunviswa,
one possible solution I would like to offer is to create copies of your lookup data input component (B), so that you have 4 of them connected to the tMap. For each lookup, join the main input (A) using a different one of the conditions you mentioned in the SQL. Set the join model to "left outer join". In the "Var" section of the tMap, you can check which of the 4 lookups returned null or not null and proceed as needed.
Best regards,
Thomas