Skip to main content

Hi,

 

When I try to overwrite a layer in AGOL using the AGOL Feature Service Writer it creates a duplicate feature layer, with a different feature ID. I need to overwrite as there is a schema change in the data and i’m trying to avoid creating a new feature layer as we’ll have to re-configure the downstream map services.

I ran the same workbench on a different environment and it had no issues overwriting the layer I was pointing at.

 

Any ideas on how to get this to overwrite?


I’ve attached a screenshot of the settings I'm

 using

 

Hi, @sam_appleton.

 

Have you tried using the FeatureWriter as a substitute using these parameters (attached screenshot)? You can use the Import from Dataset… option to bring in your layers. From there, it should produce what your trying to resolve.

 


What happens if you set “Feature Type Handling” from “Use Existing” to “Truncate Existing”? I have not tried if the item ID stays the same this but truncate should do what you want, with the schema change.

 

Hmm, when I read the documentation, it suggests you need to do it as you described…

When creating or overwriting a Feature Service, the feature operation of all the writer’s feature types should be set to Insert. Note that the Feature Type Handling option should not be set to Truncate Existing.


Hi, @sam_appleton.

 

Have you tried using the FeatureWriter as a substitute using these parameters (attached screenshot)? You can use the Import from Dataset… option to bring in your layers. From there, it should produce what your trying to resolve.

 

Hi Ali,

 

I couldn't get this to work either. I tried the initial settings that I had, with a new layer and there were no issues overwriting it. For some reason FME is struggling with this layer.

 

All I was trying to do was add a new field and  I resolved this by doing it via the AGOL interface - Once this was added I was able to write to the new field from FME :)

 

Thank you for your help on this,

 

Sam


Hi, @sam_appleton.

I think its possible there may be an issue with that one layer?

What happens if you set “Feature Type Handling” from “Use Existing” to “Truncate Existing”? I have not tried if the item ID stays the same this but truncate should do what you want, with the schema change.

Hmm, when I read the documentation, it suggests you need to do it as you described…

When creating or overwriting a Feature Service, the feature operation of all the writer’s feature types should be set to Insert. Note that the Feature Type Handling option should not be set to Truncate Existing.

@nielsgerrits has a good point here. Using Truncate Existing (a community member said it well) essentially first deletes all records (layers) from the destination (AGOL in this case) and adds new records to it (essentially adding everything back from the writer). The disadvantage of using it is you will need to add everything back after adding that one layer, if you have it in the same directory as the other layers, I believe.

My suggestion would be to use this parameter option on the FeatureWriter instead and give it a try on a separate testing directory; as @nielsgerrits mentions, that the Esri ArcGIS Online (AGOL) Feature Service Writer shouldn’t use this option.

Let me know if it works (adding with no duplication and the same ID) 🙂!

Best,


Reply