Issue with MysqlCommit and MysqlRollback

Highlighted
One Star

Issue with MysqlCommit and MysqlRollback

I have an issue with the Mysql Commit and Rollback components.
I have inserting rows into 2 tables and I need the row inserted into the first table to be rollback if the second insert failed.
For now it seems the insert is executed every 100 rows which is fine. But this insert is not rollback if the insert into the second table failed.
Here is my configuration. Please let me know if you need any other information so you can help me.
Thanks
Employee

Re: Issue with MysqlCommit and MysqlRollback

Hi,
To use the Commit and Rollback components; you have to create a Connection with the following tMySQLConnection and then use into the tMySQLOutput component the "Use an existing connection".
In that case the Commit will be executed only if you have no error in your subJob; or Rollback if you have one or some exceptions.
Attached a JobDesign's screenshot which show a Connection + Commit/Rollback rules.
Best regards;

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download