You are here: FME Readers and Writers > Esri ArcGIS Online Feature Service Reader/Writer > Writer Overview

Writer Overview

The ArcGIS Online Feature Service Writer uses the ArcGIS REST API to create Feature Services and write features.

When writing to an existing Feature Service, it is strongly recommended that you select Writer > Import Feature Types in order to obtain the schema for all layers in the Feature Service.

In particular, publishing a Feature Service can result in changes to the schema of feature types. See the Troubleshooting section for details.

In most cases, writer operations are atomic. INSERT, UPDATE, DELETE operations are all combined into a single request per feature type. If the operation for any single feature fails, then all other write operations for that feature type are automatically rolled back. By default, Feature Services support atomic operations. If ArcGIS Online returns an error for any write operation, the ArcGIS Online Feature Service Writer will pass the error messages to the log.

If the destination Feature Service layer supports Z or M values, the ArcGIS Online Feature Service Writer can write them. However, it is currently not possible to create Feature Service layers with Z or M support.

Feature Service Creation

If the Feature Service directive refers to a Feature Service that does not exist, and the writer mode for all feature types is INSERT, then the ArcGIS Online Feature Service Writer will create the Feature Service. The mechanics of this operation differ significantly from writing to an existing Feature Service:

The mechanism for this operation differs significantly from the case of writing to an existing Feature Service. The Shapefile Item remains on the Portal after the Feature Service is published from it. The Feature Service has no dependency on the Shapefile Item, so it is safe to delete it.

Warning: Due to the Shapefile creation step, the limitations of the Esri Shape format apply when creating a new Feature Service. In order to prevent commonly-encountered problems, the ArcGIS Online Feature Service Writer will enforce some of Shape’s attribute name constraints, such as capitalization and length.

Object (Feature) IDs

When a Feature Service is created, ArcGIS Online will add to all layers a new field that serves as the primary key. This is called the Object ID field. Typically, ArcGIS Online will name this field “FID”, but it is possible for layers to have a different name for its Object ID field. Note that the value of this field is always assigned by ArcGIS Online: values provided for this attribute during INSERTs are ignored by the server.

When in UPDATE or DELETE mode, a value must be provided for the attribute that corresponds to the Object ID field. If the attribute is not present, the writer will output an error message that specifies the name of the required attribute.

Layer Creation

Layers can only be created as part of creating a Feature Service. Creating new layers in an existing Feature Service is not supported at this time. Feature types that do not correspond to a layer in an existing Feature Service will result in an error.