Programatically create an editable copy of a hosted Feature Layer on ArcGIS Online

234
1
01-30-2022 10:09 AM
Manu
by
Occasional Contributor

I want to use the ArcGIS Python API to copy a Feature Layer hosted on ArcGIS Online from a Group to my account in order to edit it without changing the original. The copied layer should ideally be stored on ArcGIS Online (not locally on my computer) and updated whenever I run the Python script. Subsequently, my plan is to add fields to the layer and fill in some values.

How can I achieve this using Python (running from within ArcGIS Pro; without creating a new Feature Layer each time but only updating the copied part if the original was changed and then calculating the additional fields)?

0 Kudos
1 Reply
SzuNyiapTang
Esri Contributor

Hi @Manu ,

You may want to explore using Truncate and Append, or else you will need to have a unique ID to do feature comparison and apply edits.

Here is an example of Append Features using the ArcGIS API for Python (esri.com)

Cheers,

Tang

Cheers,
Tang