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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
JSey
Creator
Creator

Dynamic File name for Input file?

Hi

 

For tfileinputdelimited, I need to read a csv file, but the client wishes to append the date to the filename every time.  How can I set up the path to the source file if the date part of the filename changes every day?

 

For example, c:\Talend\client_2020_02_15.csv

Labels (3)
2 Replies
Jj5
Contributor III
Contributor III

You can add a tFileList component, set the path to c:\Talend\, then add a filemask for "client_*.csv" with the double quotes included. This will pull in the file with any date afterwards. Right click the tFileList_1 and click row > Iterate and drag that onto your input component.

 

Then for the input component, set the file name to ((String)globalMap.get("tFileList_1_CURRENT_FILE")) and it will pull in the file name that it finds from the tFileList.

 

FSternberg
Contributor III
Contributor III

I have one case that look like this.

the difference is that I have 10 differents csv’s in the same folder and too with date at the end of filename.

the doubt is in input component because I have the relation between filename x tablename , it works fine only when I cut the date of the filename.

how I can do to solve it?

thanks