<?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: append to agol feature service not working in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421826#M18745</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Russell. Good to know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;-Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jan 2018 22:41:26 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2018-01-12T22:41:26Z</dc:date>
    <item>
      <title>append to agol feature service not working</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421814#M18733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some reason, I can only append one feature at a time into an existing AGOL feature service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I bring the feature service layer into Pro, plus a local data source (typically a file geodatabase). I then run the Append gp tool, mapping the fields appropriately. It appends the first feature, then fails with the following message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Start Time: Friday, 31 March 2017 9:41:20 AM&lt;BR /&gt; ERROR 999999: Error executing function.&lt;BR /&gt;General function failure [Cannot insert duplicate key row in object 'user_2456.BOAT_SURVEY_DEMO_FISHSPECIES' with unique index 'GlobalID_Index'. The duplicate key value is (9bc2a5e1-d2e2-42fd-9802-7caa78b1c739).&lt;BR /&gt;The statement has been terminated.]&lt;BR /&gt;Failed to execute (Append).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At first, my local data had no global ids, so I tried adding them, but no change, even if I ticked 'preserve global ids' in the append tool (although that failed with a different message).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone else experienced this, know what is going on, and/or have a fix?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;-Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Mar 2017 21:01:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421814#M18733</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-03-30T21:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: append to agol feature service not working</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421815#M18734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a bug that was introduced at Pro 1.4. We&amp;nbsp;are investigating the cause of it now and plan to have a fix for this in the next release. If our investigations reveal a workaround I will post it here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Russell&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Mar 2017 22:27:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421815#M18734</guid>
      <dc:creator>RussellBrennan</dc:creator>
      <dc:date>2017-03-30T22:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: append to agol feature service not working</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421816#M18735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Russell.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2017 00:20:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421816#M18735</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-03-31T00:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: append to agol feature service not working</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421817#M18736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are there any suggested workarounds to this bug? &amp;nbsp;We would like to add features to a hosted feature service used with collector, and are now faced with this issue as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2017 11:21:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421817#M18736</guid>
      <dc:creator>MatthewAyer</dc:creator>
      <dc:date>2017-04-11T11:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: append to agol feature service not working</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421818#M18737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The append works if only one item is selected - I had approx 10 records to append so just did them one at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming this is not a feasible option for large datasets, someone suggested that copy and paste might still work. I gather it just requires the source and target datasets to be exactly the same. I haven't tested this though. To do this, I would download the source feature layer from agol as a file geodatabase, truncate it to remove the existing data, append into the local layer, then try a copy paste into the agol online feature layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know if you get that working...??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm still hoping we get an actual fix asap!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2017 11:30:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421818#M18737</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-04-11T11:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: append to agol feature service not working</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421819#M18738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have come up with a way to get the append on repeat&amp;nbsp;to run via a model that keeps running until all items are appended one by one. Only problem is it takes about 4 mins per append and there are usually 100+/- a week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/354066_Capture.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2017 14:32:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421819#M18738</guid>
      <dc:creator>DamonEisenach</dc:creator>
      <dc:date>2017-05-26T14:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: append to agol feature service not working</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421820#M18739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I look forward to seeing this bug fixed.&amp;nbsp; There is a layer I'd like many to be able to update but it's not reasonable for me to expect them to be willing to select the individual records and update one at a time.&amp;nbsp; I may consider the model approach that &lt;A href="https://community.esri.com/people/damoneisenach"&gt;damoneisenach&lt;/A&gt;‌ came up with.&amp;nbsp;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 17:39:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421820#M18739</guid>
      <dc:creator>CollinMcCormick1</dc:creator>
      <dc:date>2017-12-08T17:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: append to agol feature service not working</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421821#M18740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Collin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This issue was resolved with Pro 2.0. There is also a new Append option on the item page in the latest release of ArcGIS Online. This is a very efficient way to load data into your hosted services. I would recommend looking into this if you are using AGOL hosted feature services.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Russell&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 21:53:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421821#M18740</guid>
      <dc:creator>RussellBrennan</dc:creator>
      <dc:date>2017-12-08T21:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: append to agol feature service not working</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421822#M18741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Collin and Russell&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I can confirm the issue (at least in our testing) has been resolved in latest Pro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I note though that appending (or deleting) large datasets via Pro seems excruciatingly slow to the point where I've found it impossible to update datasets with several thousand features. I gave up using Pro for that and instead used the ArcGIS Python API. I put together a script that reads a source spreadsheet in a panda df, converts to correct json format, then uploads in chunks of about 2000 features at a time. As a comparison, easily an hour or two to append via Pro, about 2 min via the script for a spreadsheet of about 20,000 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that I don't think the new option to load data direct from the AGOL will work as I think that only works on particular layers, e.g. layers published directly from csv or shape files?? Not sure on that, so something I will have to look into.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;-Paul.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p.s. See my other post which has had no replies as yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/204018"&gt;Why is ArcGIS Pro so slow to delete features or append features into ArcGIS Online?&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Dec 2017 00:36:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421822#M18741</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-12-09T00:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: append to agol feature service not working</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421823#M18742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul, can you share some code snippets of using the Python API to load data into your feature service?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Dec 2017 07:33:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421823#M18742</guid>
      <dc:creator>DrewFlater</dc:creator>
      <dc:date>2017-12-21T07:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: append to agol feature service not working</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421824#M18743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Drew&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the basic script I put together. It's pretty straightforward.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just be warned that, if run as is, it truncates the dataset and deletes everything! Don't get caught out if that's not what you want to do!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You would need to adjust the part that reads the source data and manipulates it into the json object as you need to construct an object with the correct fieldnames etc. I was just updating plain tables, so no geometry involved here but could be worked in I guess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from arcgis.gis import GIS&lt;BR /&gt;from getpass import getpass #to accept passwords in an interactive fashion&lt;BR /&gt;import pandas as pd&lt;BR /&gt;import time&lt;BR /&gt;import datetime&lt;/P&gt;&lt;P&gt;username = input()&lt;BR /&gt;password = getpass()&lt;BR /&gt;&lt;SPAN&gt;gis = GIS("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com" rel="nofollow" target="_blank"&gt;https://www.arcgis.com&lt;/A&gt;&lt;SPAN&gt;", username, password)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;item_to_update = gis.content.get('item id from agol')&lt;/P&gt;&lt;P&gt;for index, table in enumerate(item_to_update.tables):&lt;BR /&gt; if table.properties.name == 'name of the table':&lt;BR /&gt; table_to_update = table&lt;BR /&gt; &lt;BR /&gt;#confirmation we have the correct table... &lt;BR /&gt;print(str(table_to_update.properties.name))&lt;/P&gt;&lt;P&gt;# WARNING!! This deletes EVERYTHING in the table!&lt;BR /&gt;table_to_update.delete_features(where="objectid &amp;gt; 0")&lt;/P&gt;&lt;P&gt;# A couple of little helper functions:&lt;/P&gt;&lt;P&gt;def getDate(datestring):&lt;BR /&gt; if datestring is None:&lt;BR /&gt; return None &lt;BR /&gt; datestring = str(datestring).strip()&lt;BR /&gt; if datestring == 'nan' or datestring == 'NaT':&lt;BR /&gt; return None&lt;BR /&gt; try:&lt;BR /&gt; return datetime.datetime.strptime(datestring, "%Y-%m-%d %H:%M:%S") &lt;BR /&gt; except:&lt;BR /&gt; pass&lt;BR /&gt; return None&lt;/P&gt;&lt;P&gt;def getString(s):&lt;BR /&gt; if s is None:&lt;BR /&gt; return ''&lt;BR /&gt; if isinstance(s, str) is False:&lt;BR /&gt; s = str(s).strip()&lt;BR /&gt; if s == 'nan':&lt;BR /&gt; return ''&lt;BR /&gt; return s&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;sourceDataFrame = pd.read_excel(r'c:/temp/spreadsheet_data.xlsx')&lt;BR /&gt;sourceDataFrame.head()&lt;/P&gt;&lt;P&gt;features_to_be_added = []&lt;BR /&gt;notifier = 0&lt;/P&gt;&lt;P&gt;#this bit needs to be customised for the data source and data it contains...&lt;BR /&gt;for index, row in sourceDataFrame.iterrows():&lt;BR /&gt; notifier += 1&lt;BR /&gt; if notifier == 1000:&lt;BR /&gt; print('Number processed: ' + str(index + 1))&lt;BR /&gt; notifier = 0&lt;BR /&gt; try:&lt;BR /&gt; nextFeature = {"attributes":{}}&lt;BR /&gt; nextFeature["attributes"]["field1"] = getString(row['Field1'])&lt;BR /&gt; nextFeature["attributes"]["field2"] = getString(row['Field2'])&lt;BR /&gt; nextFeature["attributes"]["field3"] = getDate(row['Field3'])&lt;BR /&gt; features_to_be_added.append(nextFeature)&lt;BR /&gt; except ():&lt;BR /&gt; print("&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;Error at index: " + str(index) )&lt;/P&gt;&lt;P&gt;len(features_to_be_added) #confirmation of number of features...&lt;/P&gt;&lt;P&gt;start = time.clock()&lt;BR /&gt;print('Number of features to upload: ' + str(len(features_to_be_added)))&lt;BR /&gt;chunksize = 2000&lt;BR /&gt;chunks = [features_to_be_added&lt;X&gt; for x in range(0, len(features_to_be_added), chunksize)]&lt;BR /&gt;for index, chunk in enumerate(chunks):&lt;BR /&gt; print('chunk #' + str(index)+ ' with ' + str(len(chunk)) +' features started at {0:.2f} seconds'.format(time.clock() - start))&lt;BR /&gt; results = table_to_update.edit_features(adds = chunk)&lt;BR /&gt;print('Completed upload of {0} features in {1:.2f} seconds'.format(str(len(features_to_be_added)), time.clock() - start) )&lt;/X&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Dec 2017 21:34:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421824#M18743</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-12-21T21:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: append to agol feature service not working</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421825#M18744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is currently a limit with feature services in Pro. In the current software appending is done one&amp;nbsp;row at a time.&amp;nbsp;We are&amp;nbsp;investigating possible&amp;nbsp;performance improvements for the next few releases such as grouping the edits into fewer calls&amp;nbsp;or use the Append API on the back end.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 19:56:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421825#M18744</guid>
      <dc:creator>RussellBrennan</dc:creator>
      <dc:date>2018-01-09T19:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: append to agol feature service not working</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421826#M18745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Russell. Good to know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;-Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2018 22:41:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/append-to-agol-feature-service-not-working/m-p/421826#M18745</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-01-12T22:41:26Z</dc:date>
    </item>
  </channel>
</rss>

