user696847
user696847

Reputation: 469

Transactions in 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!

Upvotes: 12

Views: 7288

Answers (2)

E LaRoche
E LaRoche

Reputation: 1144

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.

Upvotes: 2

Shong
Shong

Reputation: 141

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

Upvotes: 14

Related Questions