I was wondering if you let me know how I can set file mask for tFilelist component in Talend that it recognize date automatically and it will download only data for desired date?
I have tried some approach and I faced with some errors like "the method add (string) in the type list <String>
is not applicable for the arguments (Date)"
Put File Mask on tFileList Component dynamically
7k views Asked by Hassan At
1
There are two ways of doing it.
See both of them in component
1st approach,
context.dateFilter=TalendDate.getDate("yyyy-MM-dd");
"ABC_2015-06-19.txt"
thenIn tFileList file mask use this variable as follows.
"ABC_"+context.dateFilter+".*"
2nd approach
In tFileList file mask use date function as follows.
"ABC_"+TalendDate.getDate("yyyy-MM-dd")+".*"
these are the two best way, you can make changes in file mask per your file names.