Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Rolling Back data of all subjobs in case of error

Hi 

I have the following case:

I have 2 separate subjobs within a job that push data into to separate tables with master/child relationship. Upon executing the Job the master SubJob succeeds and imports the data in the master table and when I got an error in the execution of the Child Subjob the whole Job halts with an error but the imported data in the master SubJob has already been committed which is creating inconsistency in may database model. I need a help in considering all data in subjobs as one unit either all of them committed  in case of successful execution or rolleback in case of error. Is there a way of doing it noting that I'm using  tOracleOutput components to push the data to the destination tables and tDie components to halt the system in case of error.

Thanx

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Thanx Kzone.

Actually I used the tOracleConnection, tOracleCommit and tOracleRollback and it worked.

Regards,

View solution in original post

3 Replies
Anonymous
Not applicable
Author

hi wissamaoufan,

consider that if you want to start a transaction you need to use tConnectionXXX & tClose (connection) component.
Every output DB components that 'll use that transaction, will use the option 'use an existing connection'.
By that way, you'll have to commit/rollback your transaction depending on success/error of your application.

If the transaction occured on several job or master/child job , you should name your connection (instance's name).
Every job that need to use that instance for transaction will need to use the tconnectionXXX component and the selection of that option.
Hope I'm clear enought as it sound  a little bit tricky 0683p000009MACn.png

see that page on Talend Help portail & I think you'll got it 0683p000009MA9p.png
https://help.talend.com/search/all?query=Sharing+database+connection+between+parent+job+and+child+jo...

hope it helps
regards
laurent
Anonymous
Not applicable
Author

Thanx Kzone.

Actually I used the tOracleConnection, tOracleCommit and tOracleRollback and it worked.

Regards,
Anonymous
Not applicable
Author

great 0683p000009MACn.png
thanks to put topic as resolved
regards