<?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 Features to an AGOL Hosted Feature Layer (HFL) from Geojson File with ArcGIS API for Python - Very Slow in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1606455#M11323</link>
    <description>&lt;P&gt;Jake:&lt;/P&gt;&lt;P&gt;This was the original route I was taking, but I was trying to use the Truncate tool which is only available through ArcGIS API for Python so I had to log in twice, once for arcpy and then again for&amp;nbsp;ArcGIS API for Python.&lt;/P&gt;&lt;P&gt;Can I use Delete Features tool to remove records from AGOL HFL before running the append tool?&amp;nbsp; If so, is that tool fast to process?&lt;/P&gt;</description>
    <pubDate>Wed, 16 Apr 2025 13:19:07 GMT</pubDate>
    <dc:creator>MichaelVolz</dc:creator>
    <dc:date>2025-04-16T13:19:07Z</dc:date>
    <item>
      <title>Append Features to an AGOL Hosted Feature Layer (HFL) from Geojson File with ArcGIS API for Python - Very Slow</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1606154#M11318</link>
      <description>&lt;P&gt;I am trying to append features to an AGOL HFL from a Geojson file with ArcGIS API for Python, but it is very slow.&amp;nbsp; I do not know if there is some sort of size limit for this procedure, as I am attempting to append 14K point features with about 20 columns to the AGOL HFL.&lt;/P&gt;&lt;P&gt;Has anyone attempted such an operation with success?&lt;/P&gt;&lt;P&gt;Any help or hints are greatly appreciated.&amp;nbsp; Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Apr 2025 17:59:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1606154#M11318</guid>
      <dc:creator>MikeVolz</dc:creator>
      <dc:date>2025-04-15T17:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Append Features to an AGOL Hosted Feature Layer (HFL) from Geojson File with ArcGIS API for Python - Very Slow</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1606158#M11319</link>
      <description>&lt;P&gt;I have a much, much larger point file that I append as part of some automations I have set up. What does your script look like and what amount of time are you calling long?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Apr 2025 18:05:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1606158#M11319</guid>
      <dc:creator>AustinAverill</dc:creator>
      <dc:date>2025-04-15T18:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Append Features to an AGOL Hosted Feature Layer (HFL) from Geojson File with ArcGIS API for Python - Very Slow</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1606241#M11320</link>
      <description>&lt;P&gt;Below is the script I am trying to use.&amp;nbsp; The script has been running for several hours now on a Windows Server server where Task Manager Python CPU is at 0%, but IDLE has not indicated that the script has finished and the script has not thrown any errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import arcgis&lt;BR /&gt;import arcpy&lt;BR /&gt;from arcgis import GIS&lt;BR /&gt;&lt;BR /&gt;user = "User Name"&lt;BR /&gt;password = "Password"&lt;BR /&gt;item_id = "AGOL Item ID"&lt;BR /&gt;&lt;BR /&gt;gis = GIS(r"AGOL URL",user, password)&lt;BR /&gt;&lt;BR /&gt;data_id = gis.content.get(item_id)&lt;/P&gt;&lt;P&gt;print(data_id)&lt;BR /&gt;layer = FeatureLayer.fromitem(item=data_id, layer_id=0)&lt;/P&gt;&lt;P&gt;print(layer)&lt;BR /&gt;print(" Truncate features started")&lt;BR /&gt;layer.manager.truncate()&lt;BR /&gt;print(" Truncate features completed successfully!!!\n")&lt;/P&gt;&lt;P&gt;# Get file path to upload geojson file&lt;BR /&gt;file_path = "File path and file name"&lt;/P&gt;&lt;P&gt;geojson = gis.content.add({&lt;BR /&gt;"type": "GeoJson",&lt;BR /&gt;"title": "Name of uploaded Geojson file in AGOL",&lt;BR /&gt;"tags": ["Tags"]&lt;BR /&gt;}, data=file_path)&lt;BR /&gt;geojson&lt;/P&gt;&lt;P&gt;print(" Geojson item id = " + geojson.id)&lt;/P&gt;&lt;P&gt;FeatLay = data_id.layers[0]&lt;BR /&gt;FeatLayUrl = FeatLay.url&lt;BR /&gt;print(FeatLayUrl)&lt;BR /&gt;print(" Append features started")&lt;/P&gt;&lt;P&gt;status = data_id.layers[0].append(item_id = geojson.id, upload_format = 'geojson', source_table_name = "Common_Place_Geojson")&lt;BR /&gt;print(" Append features completed successfully!!!")&lt;/P&gt;&lt;P&gt;# Delete geojson file for next automated update&lt;BR /&gt;item_Delete = gis.content.get(geojson.id)&lt;BR /&gt;delete_result = item_Delete.delete()&lt;/P&gt;</description>
      <pubDate>Tue, 15 Apr 2025 20:37:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1606241#M11320</guid>
      <dc:creator>MikeVolz</dc:creator>
      <dc:date>2025-04-15T20:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Append Features to an AGOL Hosted Feature Layer (HFL) from Geojson File with ArcGIS API for Python - Very Slow</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1606398#M11321</link>
      <description>&lt;P&gt;Gotcha, I wouldn't expect this script to take anymore than 5-10 minutes (depending on network performance on both yours and ESRI's side. Probably less.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you observed any of the print statements? If not, I would probably terminate the script manually and add in some logging. You could potentially be stuck trying to load imports or something else. Are you using an ArcGIS Pro created environment or have you made a specific venv?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 10:20:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1606398#M11321</guid>
      <dc:creator>AustinAverill</dc:creator>
      <dc:date>2025-04-16T10:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Append Features to an AGOL Hosted Feature Layer (HFL) from Geojson File with ArcGIS API for Python - Very Slow</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1606441#M11322</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/465276"&gt;@MikeVolz&lt;/a&gt;,&amp;nbsp;I see that you have the ability to run&amp;nbsp;&lt;STRONG&gt;arcpy&lt;/STRONG&gt;.&amp;nbsp; I find arcpy's Append tool more robust.&amp;nbsp; Instead of adding your GeoJSON file to Portal/AGOL, you could convert it to features using &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/conversion/json-to-features.htm" target="_self"&gt;JSON to Features&lt;/A&gt; and then &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/append.htm" target="_self"&gt;Append&lt;/A&gt; this feature class to your feature service.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 13:03:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1606441#M11322</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2025-04-16T13:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Append Features to an AGOL Hosted Feature Layer (HFL) from Geojson File with ArcGIS API for Python - Very Slow</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1606455#M11323</link>
      <description>&lt;P&gt;Jake:&lt;/P&gt;&lt;P&gt;This was the original route I was taking, but I was trying to use the Truncate tool which is only available through ArcGIS API for Python so I had to log in twice, once for arcpy and then again for&amp;nbsp;ArcGIS API for Python.&lt;/P&gt;&lt;P&gt;Can I use Delete Features tool to remove records from AGOL HFL before running the append tool?&amp;nbsp; If so, is that tool fast to process?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 13:19:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1606455#M11323</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2025-04-16T13:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Append Features to an AGOL Hosted Feature Layer (HFL) from Geojson File with ArcGIS API for Python - Very Slow</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1606577#M11324</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10036"&gt;@MichaelVolz&lt;/a&gt;&amp;nbsp;yes, you can use the Delete Features tool, however you should note that the OBJECTIDs will not reset with this tool.&amp;nbsp; This tool is pretty fast, but not as fast as truncate.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 16:58:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1606577#M11324</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2025-04-16T16:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Append Features to an AGOL Hosted Feature Layer (HFL) from Geojson File with ArcGIS API for Python - Very Slow</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1607657#M11331</link>
      <description>&lt;P&gt;Jake:&lt;/P&gt;&lt;P&gt;The script I attached did actually work, just not on its initial run.&amp;nbsp; I also noticed that after the script ran successfully the first time some of the fields in the HFL that was truncated did not get all fields correctly populated with the Append process.&amp;nbsp; I ran the script again and the fields were then populated so that was a false negative which I initially thought might be a bug.&lt;/P&gt;&lt;P&gt;I then added this script to a Scheduled Task and confirmed that it is a repeatable successful process where no field values are being lost in the Append process.&lt;/P&gt;&lt;P&gt;Also note that this was a small point data set, so not sure the same results will occur on a more complex polygon data set with a much larger number of features.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Apr 2025 14:39:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1607657#M11331</guid>
      <dc:creator>MikeVolz</dc:creator>
      <dc:date>2025-04-21T14:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Append Features to an AGOL Hosted Feature Layer (HFL) from Geojson File with ArcGIS API for Python - Very Slow</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1607665#M11332</link>
      <description>&lt;P&gt;Mike, this script should work well. The only issues that you may run into with field matching like described (that I can think of) is how the geojson is being generated. If you are passing this through a shpefile format at some point its possible that fieldnames are being altered, or if your field names don't match the hosted service to start with (spaces in column names, etc.) The Append function does a pretty good job of trying to recognize small discrepancies and reconcile them, but is far from a miracle worker!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Might be useful to save and examine the GEOJSON file on the next couple updates and make sure that the source file you are appending is matching 1:1 with the given dataset schema.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Apr 2025 14:59:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1607665#M11332</guid>
      <dc:creator>AustinAverill</dc:creator>
      <dc:date>2025-04-21T14:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Append Features to an AGOL Hosted Feature Layer (HFL) from Geojson File with ArcGIS API for Python - Very Slow</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1607672#M11333</link>
      <description>&lt;P&gt;Austin:&lt;/P&gt;&lt;P&gt;Based on previous experience with shapefiles truncating field names that were created on purpose with more than 10 characters for clarity, I avoid using shapefiles in processes such as this.&lt;/P&gt;&lt;P&gt;Also what software do you use to view a&amp;nbsp;&lt;SPAN&gt;GEOJSON file to make it more human readable?&amp;nbsp; Looking at GEOJSON in Google Chrome or Microsoft Edge is difficult.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Apr 2025 15:11:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1607672#M11333</guid>
      <dc:creator>MikeVolz</dc:creator>
      <dc:date>2025-04-21T15:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Append Features to an AGOL Hosted Feature Layer (HFL) from Geojson File with ArcGIS API for Python - Very Slow</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1607673#M11334</link>
      <description>&lt;P&gt;You can import it into Pro or Google Earth and see the field names and all pretty easily. Or you can just read the GEOJSON on using geopandas and examine the columns from the geodataframe.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Apr 2025 15:13:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1607673#M11334</guid>
      <dc:creator>AustinAverill</dc:creator>
      <dc:date>2025-04-21T15:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Append Features to an AGOL Hosted Feature Layer (HFL) from Geojson File with ArcGIS API for Python - Very Slow</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1675146#M11828</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/77685"&gt;@AustinAverill&lt;/a&gt;&amp;nbsp;!! I have a very large point file that ive been trying to test around with appending some of those features into a different layer as some what of a backup/storage, we're trying to automate and append of those features nightly into an agol notebook, i was wondering if you were accomplishing something similar and if so, how many of those features are you able to append? mine seems to cap at 28800 and i get a json decode error if i try to do any more than that. are you able to accomplish something similar in your environment&lt;/P&gt;</description>
      <pubDate>Mon, 29 Dec 2025 16:35:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1675146#M11828</guid>
      <dc:creator>sophered</dc:creator>
      <dc:date>2025-12-29T16:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Append Features to an AGOL Hosted Feature Layer (HFL) from Geojson File with ArcGIS API for Python - Very Slow</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1676646#M11835</link>
      <description>&lt;P&gt;Yes. I typically handle these workflows using a truncate and append approach, handling the geojson file to AGOL as an individual upload then using the hosted geojson file as my append data source. That code typically looks something like the following (Please note I am quickly adapting this from some classes I have written to handle this, so some of the syntax is going to look a bit odd):&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS
from arcgis.gis import ItemProperties, ItemTypeEnum


def upload_geojson(gis, filepath: str, itemname: str) -&amp;gt; str:
    
    if ".geojson" not in filepath:
        raise TypeError("Filepath does not indicate a .geojson format")

    folder = gis.content.folders.get()

    upProps = ItemProperties(title=f"{itemname}",
                                description=f"Temp Upload for {itemname} append",
                                item_type=ItemTypeEnum.GEOJSON)


    item_upload = folder.add(item_properties=upProps,
                                file=filepath).result()
    
    return item_upload.id

def clear_layer(hosted_fl: FeatureLayer) -&amp;gt; dict:
    try: 
        hosted_fl.manager.truncate()
        
        output = {
            "status" : "success"
        }
        return output
    
    except Exception as e:
        
        output = {
            "status" : "error",
            "error" : str(e)
        }
        
        return output
    
def append_data(hosted_fl: FeatureLayer, upload_itemid: str) -&amp;gt; dict:
    try:
        hosted_fl.manager.append(upload_itemid,
                                 "geojson")
        
        output = {
            "status" : "success"
        }
        return output
    
    except Exception as e:
        
        output = {
            "status" : "error",
            "error" : str(e)
        }
        
        return output
    
    
gis = GIS()
geojson = "path/to/your/file.geojson"
hosted_fl = gis.content.get("itemid").layers[0] #or whatever ordinal position the layer is

upload_itemid = upload_geojson(gis, geojson, "temp_upload")
truncate_result = clear_layer(hosted_fl)

if truncate_result["status"] == "success":
    append_result = append_data(hosted_fl, upload_itemid)
    print(append_result)
    
if append_result["status"] == "success":
    #clear the geojson item to reduce storage costs
    temporary_item = gis.content.get(upload_itemid)
    temporary_item.delete()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2026 11:51:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/append-features-to-an-agol-hosted-feature-layer/m-p/1676646#M11835</guid>
      <dc:creator>AustinAverill</dc:creator>
      <dc:date>2026-01-08T11:51:27Z</dc:date>
    </item>
  </channel>
</rss>

