Question

Update geodatabase geometry only

  • 27 November 2017
  • 5 replies
  • 39 views

Hi, sorry for something probably very basic.

In my geodatabase I have a polygon featureclass with a lot of attributes. On a regular basis I receive new polygondata in the form of Shapefiles which shall be written to the existing featureclass.

If the new data from the shapefiles do not overlap the existing data, they are inserted to the geodatabase (via fme_db_operation = INSERT).

But if the new data overlap existing data I just want to compute a new geometry for the polygons with the Dissolver and update the geometry in the geodatabase with fme_db_operation = UPDATE.

The geodatabase writer is in UPDATE writer-mode, and I specify an "Update Key Field", but still run into (the probably famous) error number from ArcObjects '-2147220985'.

Could be a number of reasons probably, I have a feeling it might be that my "Update Key Field" is not an ESRI ObjectID but I am really not sure. Comments, ideas, help is much appreciated.

 

best

Pål Herman

 


5 replies

Userlevel 2
Badge +16

Next to the fme_db_operation, you can specify the fme_where attribute (eg OBJECTID = @Value(OBJECTID) to identify the record that needs to be updated.

Next to the fme_db_operation, you can specify the fme_where attribute (eg OBJECTID = @Value(OBJECTID) to identify the record that needs to be updated.

 

Thanks, I will have a look at that. I have a separate "paths" in my workspace, one for the non-overlapping polygons and a separate for the updates, so I guess this should be easy to add to my "update path". I believed the "Update Key Field" had this sort of functionality. Will try this later tonight.

Next to the fme_db_operation, you can specify the fme_where attribute (eg OBJECTID = @Value(OBJECTID) to identify the record that needs to be updated.

I see now I was a little unprecise. What I tried was to do an UPDATE based on a field which is not of the "Object ID" type - it is a GUID field. Seems to me that a "Object ID" type of field is mandatory for using the UPDATE functionality (not possible to specify other field types)?

 

Userlevel 2
Badge +16
I see now I was a little unprecise. What I tried was to do an UPDATE based on a field which is not of the "Object ID" type - it is a GUID field. Seems to me that a "Object ID" type of field is mandatory for using the UPDATE functionality (not possible to specify other field types)?

 

You should be able to use the fme_where with GUID='@Value(guid_attribute)'.

 

But as this is a character field you need to have the single quotes.

 

And assuming the database field is called GUID.

 

 

You should be able to use the fme_where with GUID='@Value(guid_attribute)'.

 

But as this is a character field you need to have the single quotes.

 

And assuming the database field is called GUID.

 

 

Thanks for Your inputs erik_jan! I tested it and was successful (after some struggle as always). In my case I changed the approach a little, keeping the original ObjectID fields from my tables (with a added prefix) and use FeatureMerger to merge the UPDATES to the existing table on the GUID's, then restoring the ObjectID I need before writing the UPDATES. Somehow I found this approach easier to debug. FeatureMerger seems to do the trick and the number of Updates is fairly low (few hundreds), and I guess I can change to Joiner leaving the hard work to the database if I run into performance problems when I put this stuff into production. Best pH

 

 

Reply