[resolved] Reading flat file with a dynamic file name in talend

One Star

[resolved] Reading flat file with a dynamic file name in talend

Hi Guys,
Was wondering if you could assist.
I am trying to read a flat file that has a dynamic file name; dynamic in a sense that the first part of the file name remains static but the last part(date) changes daily i.e: FADEAL_20110329. I was going to use the tInputFilePositional function, but that's as far as I got.
Please Please Please help if you can...
Thanking yall in advance Smiley Happy
Thanks and Regards,
Panik

Accepted Solutions
Employee

Re: [resolved] Reading flat file with a dynamic file name in talend

In the input field where you specify the filename, you can use an arbitrary Java expression.
For example:
"c:/Path/To/Directory/FADEAL_" + TalendDate.formatDate ("yyyyMMdd", new java.util.Date())
This would create a timestamp of the current date.
Hope that helps.

All Replies
Employee

Re: [resolved] Reading flat file with a dynamic file name in talend

In the input field where you specify the filename, you can use an arbitrary Java expression.
For example:
"c:/Path/To/Directory/FADEAL_" + TalendDate.formatDate ("yyyyMMdd", new java.util.Date())
This would create a timestamp of the current date.
Hope that helps.
One Star

Re: [resolved] Reading flat file with a dynamic file name in talend

Thank you very much aspiegel it works Smiley Happy
Much Appreciated.