Hi guys,
I have a small Talend job that reads CSVs and makes an XML from its rows, then moves the CSVs in an archive folder afterwards.
Im having a problem trying to catch CSVs with errors, the job stops and doesnt continue on the other CSVs afterwards.
How can I catch the errors in the XML mapping and be able to move that certain CSV, then continue with the other CSVs in processing them?
Hi You need to design the job as below: main job: tFileList--iterate--trunjob trunJob: call the child job, pass the current file path to the child job, uncheck the 'die on error' option so that the main job can continue to process the next file even though the child job has an error. child job: tFileInputDelimited--main--tXMLMap--tLogRow Fefer to this KB article to know how to pass a value from main job to child job. Let me know if you have any problems.
Does this mean I will have 2 Talend Jobs now? Is there another workaround that only involved 1 job? Because this will be built as a standalone job that will be schedule using a script.
Hi
Strictly speaking, they are not entirely separate jobs, they are not entirely separate jobs, the child job is called by the main job, you just need to export the job script of main job as a standalone job and schedule it.
Hello,
Unfortunately my manager/in-charge does not want the job to change that much anymore, he just wants to have a way to continue processing other CSV rows and files after encountering an error in a certain CSV. Would this be possible without altering the job that much?
Can I catch/bypass a row/file error and continue with the other rows and files in the folder?
Hi If the error occurs on tFileInputDelimited component, unchecking the 'die on error' option on tFileInputDelimited will allow the job to continue to read other rows and files, but the error messages can't be captured by tLogCatcher component with this way.
There is a way you can trap the errors in the tXMLMap and continue...well, actually you will need to add a tMap before the tXMLMap and put the logic from the tXMLMap into the tMap. This is because for some reason the functionality I demonstrate in this
link is not available in the tXMLMap.
Why is that Shong?
Hi rhall_2.0
I agree with you that tMap can be used to trace the error and continue to process the next rows if the error is not an I/O error occurred on input/output component.