[resolved] Not able to process multiple files using tFileList
I am unable to configure Talend to process multiple files. I have a job that transforms TXT files to HL7 files and that part of the job is working.
I am trying to iterate on a folder with multiple TXT files to transform them to HL7. I am using tFileList as the component to provide this function. There are 10 TXT files to be process in the source directory.
When I run the job, only the last of the 10 txt files is transformed.
Please help!!!
hi,
do a simple test.
iterate the repository with tFilelist and link to a tRunJob.
As parameter past the value of the iterate file.
in child job calling by tRunJob, put a tJava & use println() method to see each file going through the process.
when it's ok, in child job manage your data coming from file iteratevely.
if result have to go in a single file , use append.
hope it help
regards
laurent
Hi Sabrina, I'm going to try to do what kzone recommended though at first glance I'm not sure I understand. Would you be able to provide me with an email that I can attach the zipped job? Thanks
Hi kzone, thank you for your help. I am unable to understand how to 'iterate the repository with tfilelist'...
would you be able to provide additional information?
Thank you,
Ray
Hi Sabrina, I am going to try to connect a tRunJob that will run the job that does successfully create the last of the 10 HL7 files from the TXT files. I think if I add a tFileDelete after the HL7 output, i can delete the last txt file used. I can then continue to run the run component until no TXT files are left. That will work right? Well I'm off to try it... Please keep me informed with what you are finding with the issue. Thanks!!
hi, I'm very new to the Talend I too had the same problem.I'm trying to merge the multiple files into a single file which have the same schema.For that purpose I used workflow as tFilelist-->tFileInputDelimited-->tFileOutputDelimited(append) I used tFileInpuDelimited from Repository and in order to merge changed the property from built in into repository and changed the file path as per tFilelist global map variable. Please let me know where I did mistake. Thanks in advance.
Hi,
With this job design, it will delete the current txt file that is passed by tRunJob from the main job to child job.
Could you please send your current job to me( the email address is just under my avatar).
Best regards
Sabrina
here is an example to iterate on File repository and manage data from each file in a child jobh (just a tJava for the test) @screenshoots
regards
laurent