Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Conditional Lookup in tMap

Hello,

 

I am trying to implement a conditional lookup in tMap. Appreciate any help/suggestions to achieve it. 

Use Case:

I have two different Files say Cards and Loans. For Cards I want to perform certain lookup and for Loans I have different lookup. I want it to fit it in a single graph which will be driven based on Context. For Cards I want to use 2 lookup files and for Loans I have to use 3 lookup files in my Tmap. The queries, keys are all stored in context. Is there any way I can disable a flow (or do nothing) when I am running the job for Cards?

 

I tried to put a condition but it doesn't work. Any alternative approach?

0683p000009LxT8.jpg

 

 

 

 

 

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

OK, I have mocked up an example of the flow. You can see it in the screenshot below.....

0683p000009Lx2r.png

 

Take a look at this documentation on the tHashOutput (also look for tHashInput documentation in the same location) https://help.talend.com/reader/KxVIhxtXBBFymmkkWJ~O4Q/ZyJapHDibvg4pI_FFSSyWA

 

 

View solution in original post

3 Replies
Anonymous
Not applicable
Author

You are making this harder and less supportable by other Talend developers than it needs to be.

The best way to achieve this is to (I'm basing this on the idea of switching logic on and off based on context variable values) have 2 tMap components, 1 configured for one type of lookup and another configured for another type of lookup. Load your data from your database (your main data) into a tHashOutput component. Then use RunIf links to connect to next SubJob (one for each lookup configuration). Your RunIf links will link to tHashInput components linked to your tHashOutput, which will pass your data to the appropriate tMap. Once this conditional processing is over and the rest of the job is intended to run in the same way, you would again load the data to a tHashOutput (this time linked to an existing, but empty tHashOutput) and then read it in using a tHashInput connected to the empty tHashOutput. This linking of tHash components is incredibly powerful when doing stuff like this.

Anonymous
Not applicable
Author

Thanks for your valuable feedback. Since I am new to Talend, I was trying with the options that I am aware in the previous ETL tool. I understand the concept you are suggesting. Can you please give an example screenshot on how to use this tHashinput and tHashoutput component in the scenario described?

Anonymous
Not applicable
Author

OK, I have mocked up an example of the flow. You can see it in the screenshot below.....

0683p000009Lx2r.png

 

Take a look at this documentation on the tHashOutput (also look for tHashInput documentation in the same location) https://help.talend.com/reader/KxVIhxtXBBFymmkkWJ~O4Q/ZyJapHDibvg4pI_FFSSyWA