<?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 Re: Update attribute on large dataset stored in AGOL in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/update-attribute-on-large-dataset-stored-in-agol/m-p/1115677#M42910</link>
    <description>&lt;P&gt;spent the day trying to do it via a replica but there seems to be no way to upload the data back into AGOL to sync &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Nov 2021 16:08:04 GMT</pubDate>
    <dc:creator>StuartMoore</dc:creator>
    <dc:date>2021-11-10T16:08:04Z</dc:date>
    <item>
      <title>Update attribute on large dataset stored in AGOL</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/update-attribute-on-large-dataset-stored-in-agol/m-p/1115538#M42905</link>
      <description>&lt;P&gt;so i have a point dataset stored in AGOL as a feature service containing a little over 12 million rows and i need to update one field based on some criteria&lt;/P&gt;&lt;P&gt;my initial thought was to create a script to do it in Notebooks in AGOL&lt;/P&gt;&lt;LI-CODE lang="python"&gt;updCount =0
while True:
    try:
        updSym = slry.query(where="PROV_src='aaa' and Symbology is null", return_all_records = False, result_record_count = 2000)
        print(len(updSym))
        if len(updSym) ==0:
            break
        else:
            for x in updSym:
                #loops all returned records and updates the symbology field to 5
                print("ObjectID:- {0} -- {1}".format(x.attributes['OBJECTID'],x.attributes['PROV_SRC']))
                x.attributes['Symbology'] = 5
            #commits the edits
            res = slry.edit_features(updates = updSym.features)
            resstr = str(res)
            
            #counts the number of success = true in the results and adds it to the completed ones
            updCount = updCount + resstr.count("'success': True")
            print("updated:- {0}".format(updCount))
    except:
        print("error")&lt;/LI-CODE&gt;&lt;P&gt;the script above if just for one of the criteria and it does work but its slow i think its running about 20 seconds per 2000 rows...&lt;/P&gt;&lt;P&gt;its running the notebooks as standard and not advanced not sure if that makes a difference&lt;/P&gt;&lt;P&gt;is there a better way short of updating the original FGDB locally on my laptop and re-publishing it&lt;/P&gt;&lt;P&gt;Stu&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 08:51:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/update-attribute-on-large-dataset-stored-in-agol/m-p/1115538#M42905</guid>
      <dc:creator>StuartMoore</dc:creator>
      <dc:date>2021-11-10T08:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Update attribute on large dataset stored in AGOL</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/update-attribute-on-large-dataset-stored-in-agol/m-p/1115677#M42910</link>
      <description>&lt;P&gt;spent the day trying to do it via a replica but there seems to be no way to upload the data back into AGOL to sync &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 16:08:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/update-attribute-on-large-dataset-stored-in-agol/m-p/1115677#M42910</guid>
      <dc:creator>StuartMoore</dc:creator>
      <dc:date>2021-11-10T16:08:04Z</dc:date>
    </item>
  </channel>
</rss>

