I am trying to create a Rollback and Commit Job in Talend as shown below. On encountering an error, the flow shows to be going to the Rollback component, but the question is what has been rolled back? I can still see in my DB the 6 records as is shown in the figure. How to achieve commit and rollback then in Talend?
Solved! Go to Solution.
does your tOracleConnection component have auto-commit option checked?
If yes, try disabling it and run again. In such a case, I don't really think a separate rollback component is required since the data gets committed only if the sub job loading to oracle table, gets completed successfully.
No it is unchecked.
Also the sub job loading to oracle table is OK as you can see in the screen.
the real question is when the error has happened and the flow goes to Rollback, why not actual Rollback took place?
Well, in that case you shouldn't see those 6 records in the table as the flow would never reach tOracleCommit Component.
This is weird. Maybe you can try using tLogCatcher instead of the 'onSubJobError' link and see if that works.
Ya this is what the problem is... I am not getting proper help or guidance to proceed..
I wonder what should i do?
I am just thinking out loud here but can you try using a tOracleRow component to write a rollback query and see if that works.
Did exactly as you said. checked the 'die on error' option, but still can't see the Rollback in effect. See the screenshot below again, there is an exception in 7th row shown in the console as well, and the flow goes to Rollback component. But, records can be seen in DB.
I am using Talend 6.3 for Data Integration.
You are using the connection settings from the repository, but you should set the "Use an existing connection" checkbox to use the transaction.
O ya..just got confused for the 'same connection' as both the Connection component and Output component had same connection properties from Repository.
So, thanks that first part has been resolved.
Now, the actual scenario is that my client wants that if we put some auto fix validations like name.replaceall() etc. in some data transformation step, then he should be able to visually see all data errors that were fixed automatically so that he can approve and/or reject and/or rollback.
Will this be possible to achieve?