Doubt about catching errors but not stop the process

Five Stars

Doubt about catching errors but not stop the process

Hello, I have a job in where I need to read from one folder and load several files into a table.

My job is like this:


tFileList --iterate-> tOracleInput (to check if it's loaded or not) --Main--> tMap -- NoLoadedFile --> tFlowToIterate --iterate-->

tFileInputDelimited --row1--> tMap --DataToLoad--> tOracleOutput


So, I need to read all the files in the folder and load if the file it's not loaded yet, and when the load ends then move it to a folder, and if the loading fails then move the file to another folder but without stopping the process. If I use die on error option in tOracleOutput this is not gonna happen and the process will stop instantly, so I can't use onComponentOk or onComponentError in the tOracleOutput component because it's always ok if die on error checkbox is not marked.


I tried to use onSubjobOk and onSubjobError in tFileList but it doesn't work because it throws ok or error after reading the last file, not one by one.


Any ideas?


Thanks in advance.

Six Stars

Re: Doubt about catching errors but not stop the process

Your response was unclear to me. Based on my understanding I am suggesting you a way to catch errors without failing the job, and that is to enable the "error reject" output in the tMap by clicking on small icon on top left handside of tmap  and unchecking the "die on error" option which will help you to find the exact error row and not cause the job failure. Here's a link that explains this process in detail.

Don't forget to hit Kudos/ accept answer if the response provided is helpful.


~ ````Please don't forget to give "kudos" when a reply is helpful and click "Accept the solution" when you think you're good with it. Thanks! ~
Five Stars

Re: Doubt about catching errors but not stop the process

Sorry for the explanation, I'm not english fluent so it could be some confusing.

My problem is not in the tMap, it's when my job reads one file, if the file loading fails I want to move the file to one folder, and if a file is loaded correctly I want to move it to another folder. The tFileList component throws success when all the subjob is done, is not throwing succes o fail each file it read, thats the point. And if I mark checked the "die on error" checkbox in the tOracleOutput component the entire job stops and that is not what I pretend, but if the checkbox is not marked, the tOracleOutput throws success even when the file is not loaded correctly, so I can't use onComponentError or onComponentOk.


Tomorrow I will post some pics if it helps, now it's not possible to me.



Five Stars

Re: Doubt about catching errors but not stop the process

Hello, as I promised here it is some screenshot of my job, the thing is that I need to read several files and load into a table, and for each file I need to show a message of success or fail and the job only shows me the success message even if the table out throws an error (an sql error in this case) so only the trigger on component ok is triggered...


Talend named a Leader.

Get your copy


Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables


How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration


Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.