Skip to main content
Question

SQLExecutor, Geometry and Oracle Database

  • December 6, 2013
  • 7 replies
  • 142 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

david_r
Celebrity
  • December 6, 2013
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

Forum|alt.badge.img+1
  • October 6, 2014
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...

Forum|alt.badge.img
  • November 30, 2015

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?


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • November 30, 2015

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.


Forum|alt.badge.img
  • December 1, 2015

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


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • December 1, 2015

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.


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • December 1, 2015

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.?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings