Question

Error Handling for a Writer to Oracle

  • 14 October 2013
  • 4 replies
  • 8 views

Does FME Workbench 2013 have the ability to handle oracle exceptions without terminating the entire transformation?  Currently, the transformation encounters an oracle exception (on insert) and stops.  I'd like to log that and continue with the loading from a geodatabase file to the table with a spatial column.

 

 

Any advice or direction would be helpful. 

 

 

Thank you in advance.

 

 

-abe

4 replies

Userlevel 4
Badge +13
Hi,

 

 

You can try to test for the features that result in an exception before writing and write them to a FFS, what kind of error does oracle return?
Hello.

 

 

Here is a snipet from the log:

 

 

Oracle Writer: Translation aborted -- rerun specifying "ORACLE8I_2_START_TRANSACTION 108"

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

 

ORA-00001: unique constraint (PK_SOMENAME) violated

 

 

When I disable the constraint, I can load all of the data and this goes without saying.  So, instead of alter base tables and constraints I was curious to know if the workspace could be setup to allow errors somehow.  I'm a database guy, and very new to FME. 
Userlevel 4
Hi,

 

 

unfortunately, an Oracle exception will terminate the entire translation.

 

 

You can fix the error and restart it at the failing transaction (as the log will tell you), though.

 

 

David
Badge
Hi all,

 

 

Did you get anything new on this subject since 2013?

 

I tried an INSERT within a single statement (begin...end;) but when the rollback is done by ORACLE, my translation terminates and I have to read the log to understand what's going on.

 

I there a way to declare a variable and return it to FME? 
 DECLARE my_variable VARCHAR(255); BEGIN INSERT ... EXCEPTION     WHEN OTHERS THEN        my_variable := '[' ||SQLCODE||'] '||SQLERRM; END;
 and then expose my_variable on the SQLExecutor

 

 

Thanks for your help.

 

 

.JP

Reply