Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm having trouble finding the right way to log SQL error from a tDBRow component without actually stopping the job.
In the above job I have a tLoop component launching in parralel my subjob. the tDBInput retrieve a query from a table and the tDBRow execute that query.
If the tDBRow give back an error, I know it because in the console / TMC there is an "Error" message. Now I want to log this error in a table, I tried using OnComponentError but it doesn't work unless in click on "Die on error" in the tDBRow component, which stop entirely the job and this isn't what I want.
I find it weird that when the component say there is an error, it doesnt trigger automatically the "OnComponentError" and it actually triggers the "OnComponentOk"
I tried using "if" link and other component based on tDBRow_2_ERROR_MESSAGE value, but since I'm parallelizing the job it doesn't log the actual query that is in error
Any idea how to achieve what I want ?
Hello
- Move tDBRow component to a child job and log the error in the child job, pass the current query from main job to child job, please refer to this KB article.
- Use a tRunJob component to call the child job, uncheck the 'Die on error' option on tRunJob.
- Check the 'Die on error' option on tDBRow component. This ensures that the component throws out the error, allowing you to catch and log it.
Regards
Shicong
Hello
- Move tDBRow component to a child job and log the error in the child job, pass the current query from main job to child job, please refer to this KB article.
- Use a tRunJob component to call the child job, uncheck the 'Die on error' option on tRunJob.
- Check the 'Die on error' option on tDBRow component. This ensures that the component throws out the error, allowing you to catch and log it.
Regards
Shicong