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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Only Load Files not in the LoadFiles Table (in case of duplicates)

Hi, I have been able to figure out most of what I needed in Talend so far.  However, I'm at a point that I'm not sure how to make Talend work for what I need.  I have a table in SQL that I load file names and counts into as they process.  I need to add a step at the beginning that will check that table to see if a file with the same name has been loaded before and exclude it if it has.  I've tried figuring out a join for this and a tMap.  You can see my setup below.  The very end (circled) you see where i load the files into the table.  I have indicated where I want to put an element or series of, that will check that Files Loaded table before loading.  

 

0683p000009LzZI.jpg

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

 

     Please try below snippet before flat file read.

 

0683p000009LzHZ.pngRead list of files usinf filelist and pass the current file name as parameter in where clause

 Connect it to a tflowtoIterate component with default key value option turned on (under Basic settings)

 

Use a Run if condition and add the below condition in it

 

!Relational.ISNULL(((String)globalMap.get("row1.file_name")))

 

0683p000009LzZX.png

 

Please mark the topic as solution provided if the answer has helped you. Kudos are also welcome 🙂

 

Warm Regards,

 

Nikhil Thampi

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Hi,

 

     Please try below snippet before flat file read.

 

0683p000009LzHZ.pngRead list of files usinf filelist and pass the current file name as parameter in where clause

 Connect it to a tflowtoIterate component with default key value option turned on (under Basic settings)

 

Use a Run if condition and add the below condition in it

 

!Relational.ISNULL(((String)globalMap.get("row1.file_name")))

 

0683p000009LzZX.png

 

Please mark the topic as solution provided if the answer has helped you. Kudos are also welcome 🙂

 

Warm Regards,

 

Nikhil Thampi

Anonymous
Not applicable
Author

Hi,

May this will help to load the files only once(in case of duplicates file will come)...

First pipeline: In this we store the data with the file name using thashinput component through appending the data

Second pipeline: We store that data in a temp table

Third Pipeline: In this we can join the tgt table and temp table on the basis of file name. And it will load unique files to the Target table.

 

Regards,

Akash


1.JPG
Anonymous
Not applicable
Author

This looks great, I have it all setup but for some reason it's reading the file name as a column.

I'm getting and "Invalid column name" error and it lists the file name as the column.  It's failing on the tDBInput_1 and kicking out the error.