Skip to main content

I have a Geodatabase Feature Class in ArcSDE/Oracle. Using ArcGIS software I published an ArcGIS Online Hosted Feature Service. The Geodatabase Feature Class will be editied manually, and I want to periodically send any inserts/updates/deletes to the ArcGIS Hosted Feature Service. (I don't want to truncate and append all data because that is too slow.)

My .fmw file looks like below: (1)read the feature class and the feature service, (2)detect any inserts/updates/deletes , (3) write those to the feature service.

 

I think the error I get suggests something is not quite right with my OBJECTID field: "ArcGIS Online Feature Service Writer: 'updateResults' error for a feature in '<feature class name>'. The error code from the server was '1019' and the message was: 'The specified feature could not be updated or does not exist.'"

Does somebody have a working example of this secenario that you don't mind sharing? (Screenshots would probably suffice.) Thank you.

Hi @tfimpel.

I think your problem is that the Writer Mode is set to 'Update'. However, you also sent features that need to be input. The last ones do not have an ObjectId in the target table yet. A solution could be to add Writers for Deleting and Inserting. Another option that should work, although the option does not seem to be available in the list of choices, is to set the attribute 'fme_db_operation' for each type of operation and to activate the attribute also under 'Format Attributes' of your writer.

Also you'll have to take into account that the ObjectId of one table doesn't have to match the ObjectId of another table. From that perspective it is saver to work with a GUID.

I hope this helps.


Thanks @lars_de_vries ! I agree, and I did try to add writers and to set the attribute 'fme_db_operation' like shown in this example .

I don't think using GUID's would help me (?) because my UpdateDetector's key attribute and the attribute to match is not OBJECTID, it's field of type String.


Hi @tfimpel.

I think your problem is that the Writer Mode is set to 'Update'. However, you also sent features that need to be input. The last ones do not have an ObjectId in the target table yet. A solution could be to add Writers for Deleting and Inserting. Another option that should work, although the option does not seem to be available in the list of choices, is to set the attribute 'fme_db_operation' for each type of operation and to activate the attribute also under 'Format Attributes' of your writer.

Also you'll have to take into account that the ObjectId of one table doesn't have to match the ObjectId of another table. From that perspective it is saver to work with a GUID.

I hope this helps.

The larger picture I am working with is that the geodatabase feature class gets truncated and then batch-inserted nightly (the new data is pulled from a view that joins many manually edited tables and some batch refreshed tables). So what I ultimately want to accomplish is to not rely on my geodatabase feature class OBJECTID or GUID field at all...I don't even want to have it in my reader. But is it true that I have to have the OBJECTID field in my feature class reader if I want to connect it to a Hosted Feature Service Writer? I don't understand why this is required, it doesn't make sense to me that the FME software should work that way.

 


Reply