Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to validate filename which is going to be used as inputfile

Hello,
I am new kid on this Talend tool forum and it gives me lot of excitement to work with this tool.
I need a small help from u guyz, who have already mastered this tool. I want to validate filename
before taking it as my input and exporting the data from that file in to the database.
here goes my example
'filename_eventid_timestamp.dat' like 'customerdata_1001_03132009.dat'
if any of the input file is not in this format needs to be pointed out.here i mentioned only the .dat files but my requirement is to validate for all extensions whether it is .xml,.cvs whatever it maybe. if possible provide me some code snippet with example.
u r help will be greatly appreciated.
Thanks in advance,
chandra.
Labels (3)
3 Replies
Anonymous
Not applicable
Author

Hello Chandra
You can use tFileList component to iterate all files based on the filemask, like *.dat
Please read the user documentation and lits usage.
Best regards

shong
Anonymous
Not applicable
Author

Hi chandra,
if you need a more complex check you could use tIterateToFlow and set the filename as an attribute in your row. Now you could use standard components to handle the files. Before you use an input component add a tFlowToIterate to get back to the iteration.
Bye
Volker
Anonymous
Not applicable
Author

Thankq guyz for such a immediate response. I will go through the document and i will post later if i still need anything more information.
Talend rocks!!!!!
chandra.