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!
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With