Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to use multiple join on tMap

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.

Labels (3)
3 Replies
yashfreaky
Contributor
Contributor

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.

 


LEFT OUTER JOIN.JPG
Anonymous
Not applicable
Author

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

ThWabi
Creator II
Creator II

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