Question

SQLExecutor, Geometry and Oracle Database

  • 6 December 2013
  • 7 replies
  • 20 views

I'm having a simple script, which renames some exported attributes, then fetches the primary key sequence number using SQLExecutor and writes the result to an Oracle Database, but it seems that something gets done to the geometry during the process.

I can inspect the translation result just fine, but when I attach the translation result to the Oracle Spatial Relational Writer, on translation every geometry gets inserted with an error (the column value is null): Bad geometry detected in the following feature; Geometry could not be encoded for Oracle.

When I'm not using the SQLExecutor to fetch the primary key sequence, the script works just fine. Do I need to check something else to make FME leave the initiator geometry alone? Is this a bug?


7 replies

Userlevel 4
Hi,

 

 

that seems a bit strange, I have used the same strategy myself many times without issues. Which version of FME are you using?

 

 

As a workaround, however, you could insert an GeometryExtractor before the SQLExecutor and then an GeometryReplacer after.

 

 

David
Badge +1
I am having the same issue as Desmont.  I have tried inserting the Geometry Extractor before and the Geometry Replacer after the SQL Executor but this doesn't fix the issue.  I am using FME 2014 Desktop...
Badge

Even iam having the same issue.I have tried inserting the Geometry Extractor before and the Geometry Replacer after the SQL Executor but this doesn't fix the issue. Mine is FME 2012 Desktop.Could you please help me in this?

Userlevel 2
Badge +16

As you are using the SQLExecutor FME will add a format attribute oracle_geometry with value no_geom. This will be used writing to Oracle, so the geometry will be lost. A remedy is losing the format attribute using the BulkAttributeRemover with parameter oracle*. This forces FME to use the fme attribute fme_geometry that will contain the correct geometry type.

Badge

Sorry iam not able to find oracle_geometry attribute.tried using attribute remover transformer to remove that

Userlevel 2
Badge +16

Try the BulkAttributeRemover using oracle*. This will clear all oracle format attributes and force FME to use the fme attributes. That will work. Not finding the mentioned attribute is because it is not exposed.

Badge +3

You don't show your SQL script.

But i'm wondering if you are writing the kept initiatorgeometry to the oracle geometry column in the table you are writing to.

Or are you creating the table and have set the geometry writing correctly?

Does the initiator geometry have correct srid etc.?

Reply