<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Is ArcGIS API for Python or ArcREST faster than arcpy.da for editting hosted features? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-arcgis-api-for-python-or-arcrest-faster-than/m-p/841663#M3559</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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&amp;nbsp;ArcGIS API for Python or ArcREST offer improved performance over an UpdateCursor? I have not used these libraries yet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;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)‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 10:16:51 GMT</pubDate>
    <dc:creator>DylanWarburg</dc:creator>
    <dc:date>2021-12-12T10:16:51Z</dc:date>
    <item>
      <title>Is ArcGIS API for Python or ArcREST faster than arcpy.da for editting hosted features?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-arcgis-api-for-python-or-arcrest-faster-than/m-p/841663#M3559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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&amp;nbsp;ArcGIS API for Python or ArcREST offer improved performance over an UpdateCursor? I have not used these libraries yet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;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)‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:16:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-arcgis-api-for-python-or-arcrest-faster-than/m-p/841663#M3559</guid>
      <dc:creator>DylanWarburg</dc:creator>
      <dc:date>2021-12-12T10:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Is ArcGIS API for Python or ArcREST faster than arcpy.da for editting hosted features?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-arcgis-api-for-python-or-arcrest-faster-than/m-p/841664#M3560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/412537"&gt;Dylan Warburg&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I reckon ArcGIS API for Python is faster than arcpy in updating hosted feature services/layers.&lt;/P&gt;&lt;P&gt;Here's a link that shows how to update attributes of a hosted feature layer in AGOL or Portal:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/260030"&gt;Updating Feature layer using ArcGIS API for python. &lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;DIV class="" style="border: 0px; font-weight: inherit; margin: 20px 0px;"&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;&lt;EM style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;Please mark as helpful if you find it helpful. If it answered your question please mark it as answered.&lt;/EM&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2020 00:51:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-arcgis-api-for-python-or-arcrest-faster-than/m-p/841664#M3560</guid>
      <dc:creator>MehdiPira1</dc:creator>
      <dc:date>2020-11-10T00:51:45Z</dc:date>
    </item>
  </channel>
</rss>

