Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transactions in Talend

Tags:

talend

I want to perform transactions while writing into DB in Talend, but don't know how. I tried various component from palette, but couldn't manage to perform. I would appreciate any help or even better any tutorial related to this topic.

Thanks!

like image 830
user696847 Avatar asked Nov 18 '11 12:11

user696847


2 Answers

Talend supports the transaction rollback and commit while writing into DB.

Let's take Mysql for example: to use tMysqlConnection to create a DB connection at the beginning of job and use a tMysqlCommit to commit the change and close if the previous subjob works fine, tMysqlRollback to rollback the change if the previous subjob work failure, the simple job looks like:

tMysqlConnection_1
    |
onsubjobok
    |
tFileInputDelimited--main---tMysqlOutput
    |
onsubjobok---tMysqlCommit
onsubjoberror---tMysqlRollback

on tMysqlOutput, check the option using an existing connection

like image 194
Shong Avatar answered Sep 22 '22 15:09

Shong


There are various methods of writing data into a DB in Talend. You have the option of using a separate connection component (use an existing connection) or using a Built-In. When you use a separate connection component you need to explicitly commit your transaction using a tMSSqlCommit component (or similar component for another database type) . If you use a built-in then the transaction auto commits without a tMSSqlCommit component (or similar component for another database type).

I have prepared a more detailed tutorial for you but need reputation points to post images. I will try and get them to file server so I can link to them and post the more detailed answer.

like image 24
E LaRoche Avatar answered Sep 20 '22 15:09

E LaRoche