Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
DM2017
Contributor II
Contributor II

How to use commit & rollbak Mysql

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

Labels (2)
3 Replies
Anonymous
Not applicable

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?

DM2017
Contributor II
Contributor II
Author

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.

Anonymous
Not applicable

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).