I have a large hosted feature layer of 52,000 points. I have been building the feature layer over time by simply using the Append tool in ArcGIS Pro. Now I need to update some text and date values in these records, and I am finding that the computer takes over an hour to do so using arcpy.da.UpdateCursor. Is there a better way to do this? Do ArcGIS API for Python or ArcREST offer improved performance over an UpdateCursor? I have not used these libraries yet.
Here is an example of the simplest UpdateCursor that took over an hour - but I have many longer ones I need to do updating 10 or more fields for tens of thousands of records.
with arcpy.da.UpdateCursor(Layer,['date_approved', 'date_cleared']) as UC:
for row in UC:
if row[0] is not None:
row[1] = row[0]
UC.updateRow(row)
Hi Dylan Warburg,
I reckon ArcGIS API for Python is faster than arcpy in updating hosted feature services/layers.
Here's a link that shows how to update attributes of a hosted feature layer in AGOL or Portal:
Updating Feature layer using ArcGIS API for python.
------------------------------------------------------------------------------------------------------------------------------------
Please mark as helpful if you find it helpful. If it answered your question please mark it as answered.