span8
span4
span8
span4
The ArcGIS Online Feature Service writer has support for three modes: insert,update,and delete.This mode can be set either at the feature type level (to apply to every feature written to the corresponding feature service) or at the feature level using the fme_db_operation attribute.
This writer mode setting works in much the same way on this writer as it does for any of the database writers in FME as documented here:Database Writer ModeOne important difference with the ArcGIS Online Feature Service writer,however,is that it does not allow for manually selecting the attribute to be used as a unique identifier for making updates and deletes.Updates and deletes are done using an Object ID field that is automatically added when a new Feature Service is created.Any features being sent to the writer to be updated or deleted,therefore,must have this field set on them.
To attach the Object ID field onto your features,you can add an ArcGIS Online Feature Service reader into your 亚搏在线workflow (the FeatureReader transformer can also be used for this).The reader will bring in an attribute called FID which contains the Object ID field needed for all update and delete operations.You can then use a transformer such as the FeatureMerger to merge the FID attribute onto the features being written.
The attached workspace shows an example of how to write inserts,updates,and deletes to an ArcGIS Online Feature Service.
This workspace has two readers: one to read incoming updates from an xml feed and a second one to read the original data from the existing ArcGIS Online Feature Layer.
The FeatureMerger is used to compare the two sets of features to filter out the features that should be tagged to be inserted,updated,or deleted:
AttributeCreators are used to set the fme_db_operation attribute to tag individual features with the correct operation.Features from the Merged port on the FeatureMerger are tagged as updates,from the NotMerged port are deletes,and the Unreferenced port are updateswriteupdatestoagol.fmw
Finally,the features are sent through to the ArcGIS Online Feature Service writer.The Writer mode should be set to update.The writer will then check the FID on each of the features sent to it and will update,insert,or delete the corresponding feature in the existing layer.
For more on using fme_db_operation refer to the articleIncremental Database Updates using the FME format attribute fme_db_operation
I've been experimenting with the method you describe here in addition to using the update detector transformer.I've found that I frequently get this message below when I attempt to execute the workspace.Would you be able to offer any insight as to what's going on,and how I may be able to rectify it?
Thanks,
Warren
ArcGIS Online Feature Service Writer: 'updateResults' error for a feature in 'Roads'.The error code from the server was '1019' and the message was: 'The specified feature could not be updated or does not exist.'...Last line repeated 10 times ...ArcGIS Online Feature Service Writer: 0 features successfully written to 'Roads',but the server rejected the 1000 features in the last request due to errors.See warnings above.Aborting translationA fatal error has occurred.Check the logfile above for details
Hi@warren156
My best guess without seeing the workspace would be that maybe it is trying to update records that either don't exist in the Feature Service or it's not able to find the correct FID for an existing record in the feature service.I'd be happy to help you take a closer look into this through a support case if you'd like.You can create a case throughwww.亚搏在线safe.com/supportrequestJust add some details about the 亚搏在线workflow you are building and we can help you get this working.
Kind regards,
Laura
That would be great if you could help me out with a support case!Much appreciated.
Thanks,
Warren
Quick Tips for ArcGIS Online frequently asked questions
Geocoding with FME Using Gisgraphy
Making Weather Map Using geonames.org Web Service
Box.com - 3.Upload a File to a Directory
Writing Incremental Updates to Cloud-Based Formats
Converting fme_color to hexadecimal for Google Fusion Tables
Box.com - 1.Get Content Information for a Folder
Error Connecting to ArcGIS Online Through Proxy that Uses a PAC File
© 2019 亚搏在线Safe Software Inc |Legal