Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a job which has multiple tables involved in transaction .
1>How do I use commit and rollback, Basically on which place to be used, as I have so many sub jobs connected.
2>Where to use on component OK & where to use On sub job OK. My job is working fine. But I need to know the particular use.
Kindly help.
Hello,
Ad 1)
Example how to implement commit -
https://help.talend.com/reader/WWQ40R_iTE5~~9VkUQrjgQ/yuU8JtnIXUBiRsJYYKOngA?section=Raa91640
Example how to implement rollback -
https://help.talend.com/reader/WWQ40R_iTE5~~9VkUQrjgQ/7THiSA~u~mPb7PskcQONMQ
ad 2) OnComponentOK - for a single component check, OnSubJobOK - when you need to check that all components in the subjob finished successfully.
Regards
Lojdr
Ok. Thanks. But how to design when there are multiple transformation on a same job.
for example
tmysqlinput1>> tmp>>tmysqloutput1
tmysqlinput2>> tmp>>tmysqloutput2
tmysqlinput3>> tmp>>tmysqloutput3
Here I need all table load happens once or none. from youe suggestion I can go for individual commit & rollback but what about whole thing.
Please suggest
Hello,
There is no easy solution of this task. The only correct solution is to do it in one transaction to be sure that data will stay consistent. As far as I know, there is no possibility to commit several transaction as a one. It is always one by one and this can cause inconsistency.
I recommended one solution/workaround for MySQL in the following thread:
Please check it and let me know.
Regards
Lojdr
Unfortunately these links are dead
Ad 1)
Example how to implement commit -
https://help.talend.com/reader/WWQ40R_iTE5~~9VkUQrjgQ/yuU8JtnIXUBiRsJYYKOngA?section=Raa91640
Example how to implement rollback -
https://help.talend.com/reader/WWQ40R_iTE5~~9VkUQrjgQ/7THiSA~u~mPb7PskcQONMQ