Skip to main content

I am having issues with the ArcGIS Online Feature Writer.

The error I am getting is ArcGIS Online Feature Service Writer: 'addResults' error for a feature in 'Feature Service Name (replaced for this message)'. The error code from the server was '1000' and the message was: 'Cannot insert duplicate key row in object 'user_****.service_id_Feature Service Name (replaced for this message)' with unique index 'rowidIndex'. The duplicate key value is (<NULL>).
The statement has been terminated.'

I am comparing two feature services with the same schema, writing the new records to the second. I want to have a feature service as raw data (coming in from Survey123 for ArcGIS) and allow users to QA in the second feature service and make any edits.

It's a pretty simple workbench but for some reason the rowid isn't being passed to the editable feature service.

I have a feeling that because AGOL creates this for you that the rowid is global and so the first feature is successfully added with a rowid of NULL but the second feature is not allowed because it is also NULL.

Any ideas for this. @LauraAtSafe I've seen you've had some good answers for AGOL questions here before. Added a screenshot of the workbench.

Cheers,

Andrew

I can think of a few things that may or may not help.

1) Put a FeatureHolder transformer just before the writer feature type. If you are reading from and writing to the same table, there might be an issue about something being locked. The FeatureHolder should prevent the writing from happening until the reading is complete.

2) Are you sure the Requestor/Supplier connections are the right way around? I get the feeling you want to update the bee table with raw survey data, but if so I would expect that table to be the requestor.

3) I'd pay close attention to what is emerging from the FeatureMerger. For example, disable the writer and add an Inspector or Logger after the FeatureMerger, so you can see exactly what is being output (and what the rowid values are).

4) The FeatureMerger has parameters "Reject Null and Missing Keys" and "Ignore Nulls". You might want to try those and see if what comes out of the transformer is any different.

Hope this helps to get you started in the right direction.


I can think of a few things that may or may not help.

1) Put a FeatureHolder transformer just before the writer feature type. If you are reading from and writing to the same table, there might be an issue about something being locked. The FeatureHolder should prevent the writing from happening until the reading is complete.

2) Are you sure the Requestor/Supplier connections are the right way around? I get the feeling you want to update the bee table with raw survey data, but if so I would expect that table to be the requestor.

3) I'd pay close attention to what is emerging from the FeatureMerger. For example, disable the writer and add an Inspector or Logger after the FeatureMerger, so you can see exactly what is being output (and what the rowid values are).

4) The FeatureMerger has parameters "Reject Null and Missing Keys" and "Ignore Nulls". You might want to try those and see if what comes out of the transformer is any different.

Hope this helps to get you started in the right direction.

Much appreciated for this Mark. Will have a go at this.

I can think of a few things that may or may not help.

1) Put a FeatureHolder transformer just before the writer feature type. If you are reading from and writing to the same table, there might be an issue about something being locked. The FeatureHolder should prevent the writing from happening until the reading is complete.

2) Are you sure the Requestor/Supplier connections are the right way around? I get the feeling you want to update the bee table with raw survey data, but if so I would expect that table to be the requestor.

3) I'd pay close attention to what is emerging from the FeatureMerger. For example, disable the writer and add an Inspector or Logger after the FeatureMerger, so you can see exactly what is being output (and what the rowid values are).

4) The FeatureMerger has parameters "Reject Null and Missing Keys" and "Ignore Nulls". You might want to try those and see if what comes out of the transformer is any different.

Hope this helps to get you started in the right direction.

Hi Mark,

Thanks for your answer. My bandage solution was to generate a rowid with UUID Generator.

However, I would like to know if the AGOL feature service reader can pick up the values in the rowid and the globalid fields. It picks up objectid no problem. The reader and the writer know that they exist but when you inspect what comes out, there is no rowid or globalid in the feature attributes noted as properties or values of the feature.

Cheers,

Andrew


Reply