Select to view content in your preferred language

Overwriting feature layer from SEDF produces unwated files

552
3
09-26-2024 02:55 AM
Labels (1)
A_Schwab
Occasional Contributor

I have a script that updates an existing feature layer on AGOL with new data every hour. I used to use a process that truncated the layer, then added new data using something like this:

featurelayer.layers[0].edit_features(adds=sedf.spatial.to_featureset()) 

Recently this stopped working, throwing a 413 error, so as a workaround I changed the update process to:

sedf.spatial.to_featurelayer(overwrite=True, service={"featureServiceId": "xyzxyzxyzxyzx", "layer":0})

This works for updating the layer but each time it runs it adds two unwanted objects to AGOL, a file geodatabase and an associated feature layer.

Is there a way to stop these files/layers being created when using the overwrite option? Or a way to identify which files have been created so the script can delete then when it has finished overwriting the existing feature layer?

Tags (3)
0 Kudos
3 Replies
NanaeAubry
Esri Contributor

This is a bug we have fixed. What version of the python api are you using?

0 Kudos
A_Schwab
Occasional Contributor

I'm using v2.2.0.1

When was the fix introduced?

And what's the best place to find release annoucements to track what has changed between releases?

0 Kudos
NicholasGiner1
Esri Contributor

Hi @A_Schwab - this fix was introduced with v2.4.0.

Any time we release a new version of the ArcGIS API for Python, we include full release notes, as well as a "what's new" blog that summarizes big ticket items and main themes.

NicholasGiner1_0-1736955899647.png

 

thanks,

Nick Giner - Product Manager

0 Kudos