Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

unable to lookup into files dynamically using tfilelist

Hello All,

 

I am taking input from two files using tFilelist and passing them to tMap. tMap is connected to lookup from tFileinputExcel which is getting data from tFilelist. The look up data is coming from multiple files(more than 1).

My job is looking up in only one file in look up data. I want that both the input files check in both lookup files without hardcoding any file name.

 

 

0683p000009M8Py.jpg

Regards

Satya

Labels (1)
  • v7.x

6 Replies
Anonymous
Not applicable
Author

Hi,

 

   I would recommend to create the list of lookup data in the previous subjob. You can use tFileList and then read the file one by one for lookup data. But instead of joining directly, you can store them in a tHashOutput component or a temporary file. The use this Hash or file component in the lookup so that you do not have to do iteration at Lookup in the main job.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

akumar2301
Specialist II
Specialist II

@satya lookup will have only last file resultset as it will be loaded first for each iteration of tfilelist1.

Use thashinput/output as suggested by Nikhil
Anonymous
Not applicable
Author

Those who are unable to find tHashOutput component in the palette should do following.

  1. From the Studio File menu, select Edit Project properties.
  2. Expand Designer, then click Palette Settings.
  3. Expand Technical then select both of the components in question.
  4. Click the arrow icon add(arrow pointing right) then click OK.

https://community.talend.com/t5/Migration-Configuration-and/Where-are-the-tHashInput-and-tHashOutput... 

Anonymous
Not applicable
Author

Thanks, Nikhil. But this solution seems not working. I am still getting the same old output, i.e. lookup is happening only on the last file. I am meanwhile trying to save the lookup data in another file and then proceed.

 

0683p000009M8XQ.jpg

Anonymous
Not applicable
Author

Getting data in another file and then using that file as lookup worked. But I don't think this is optimum solution for it. I have to use tPrejob later for the next part of my development and I will be in problem using more than 1 tPreJob. @nthampi . Here I am storing the output in tOutputExcel_2 which is read by tFileInputExcel_3.

 

0683p000009M8Zk.png

akumar2301
Specialist II
Specialist II

Why do you need two tpreJob?

You can use onsubjobok from tfilelist2 .