Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have jobs which are connected to each other.
I am confused, where to put commit & rollback.
Scenario: All the jobs should complete or none. Kindly help
Your screenshot shows one job. Before I can help I need to know what you meant by "job"? Did you mean multiple jobs considering the screenshot to be an example one job? Or did you mean multiple jobs considering the different subjobs (areas encapsulated in a blue box) in your screenshot?
Basically, If the first block succeed, means data from customer to customer moves without problem, then it should go to second block(lookup transfar) and commit as a whole unit. If second block fails then it should roolback the first block. Here I am not able to understand where to keep the rollback and commit components. You are correct , I am talking about the blue boxes Hope this clears the doubt.
Take a look at this page: https://help.talend.com/reader/NNO~fmVQU4rlkF9Depfdxw/CInUFSCGXiagiSq0fcnFLQ?section=Raa91640
It shows how to use a tMySQLConnection and a tMySqlCommit. To do what you want you need to start with creating a connection, do each of your steps, then decide at the end (maybe using a tPostJob) whether everything has happened cleanly (then Commit) or whether you need to rollback (use the tMySQLRollback).