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

Oracle Rollback on Error

Hello Everyone!

 

I am, fairly, new to Talend, and I was wondering about how can I rollback in case of an error in case if the "Action on table" is not "NONE".  Your help is really appreciated.

 

Thanks!

Labels (2)
7 Replies
Anonymous
Not applicable
Author

Hello you can use :

- tOracleConnection (don't forget to uncheck commit automatique in advanced setting)

- tOracleCommit

- tOracleRollBack

- tOracleClose (don't forget to close you connection after your job)

 

Then you can manage your rollback and commit as you want and you have only one connection for your job. Instead of connect and disconnect for each tOracleInput or tOracleoutput

You can manage like this for example :

 

tOracleOutput --- OnComponentError --- tOracleRollback

     I

     I   _   _   _   _ OnComponentOk --- tOracleCommit

 

 

Hope this help.

 

Good luck ,

SGV

Anonymous
Not applicable
Author

Thanks for your reply. I have done this and I see that it goes to the rollback path however it doesnt do the rollback. And I was looking around in my destination the "action on table" is "drop table if exists" and I see warning saying that this will do an auto commit. Can you pleass explain to me what am I doing incorrectly?

Thanks
Anonymous
Not applicable
Author

Please be sure that the "Use existing Connection" is checked on your tOracleOutput component.

 

Good Luck ,

SGV

Anonymous
Not applicable
Author

I made sure. The same thing exists
Anonymous
Not applicable
Author

Oh ok, if you want to enable the "auto commit" you have to use the Default action on your tOracleOutput.

But if you want to trun table before insert, there is different way : 

- You can use a tOracleRow to execute a code before your tOracleOuput.

- You can use a temporary table

 

If you have some problem, send a screenshot of your job and explain the purpose of the job you have to do.

 

Good luck,

SGV



Irshad1
Contributor II
Contributor II

Hello

 

do you want to drop the table or want to rollback the data on error?

 

"drop table if exists"--- this will drop your table from the database.

 

Thanks!

 

Anonymous
Not applicable
Author

I would like to drop the table if exists if the job succeeds only, otherwise I'd like for it to roll back.