I have a large hosted feature layer on ArcGIS Online 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)
where_clause
in the cursor declaration, so you're not forced to do multi-node transfer for records that won't be updated.