<?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: Unable to Update/Overwrite Feature Layer using ArcGIS Python API in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-update-overwrite-feature-layer-using/m-p/1356006#M9359</link>
    <description>&lt;P&gt;I would add that method #1 works when there is only one feature layer in a geodatabase. There are multiple features in this geodatabase; could this be the reason?&lt;/P&gt;</description>
    <pubDate>Fri, 01 Dec 2023 22:00:59 GMT</pubDate>
    <dc:creator>Josh-R</dc:creator>
    <dc:date>2023-12-01T22:00:59Z</dc:date>
    <item>
      <title>Unable to Update/Overwrite Feature Layer using ArcGIS Python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-update-overwrite-feature-layer-using/m-p/1355954#M9356</link>
      <description>&lt;P&gt;I have a hosted feature layer that I am trying to update/overwrite with new data in the same format with the python API. It is uploaded to AGOL as a geodatabase then published to a feature layer.&lt;/P&gt;&lt;P&gt;I've adapted&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10527"&gt;@JakeSkinner&lt;/a&gt;'s&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A href="https://community.esri.com/t5/python-questions/automate-overwrite-web-layer-feature-class/td-p/20067" target="_self"&gt;method&lt;/A&gt; using update and publish and I have tried the &lt;A href="https://developers.arcgis.com/python/samples/overwriting-feature-layers/" target="_self"&gt;overwrite method&lt;/A&gt; described in this link. Both methods return {success=&amp;nbsp;&lt;EM&gt;true}&lt;/EM&gt;, however the data remains the same. The &lt;EM&gt;Data Updated&lt;/EM&gt; indicator in the Data tab updates, but no changes. It also appears that no matter what string (even a nonsense string like "adafcfa") I input for the data argument in the overwrite function, it returns {success=&amp;nbsp;&lt;EM&gt;true}&lt;/EM&gt;. Feeling like I've tried just about everything, I could find, please help!&lt;/P&gt;&lt;P&gt;Here are the functions I've tried:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis import GIS
from arcgis.features import FeatureLayerCollection
from arcgis.features import GeoAccessor, GeoSeriesAccessor
gis = GIS(username=un, password=pw)

# Method 1
county_item_id = 'b6e449d2fde842ec8e38bb764f95cc2e' # the geodatabase
county_zip = r".\Outputs\map\COUNTY.gdb.zip"
item = gis.content.get(county_item_id)
item.update(data=new_zip)
item.publish(overwrite=True, file_type='fileGeodatabase')

# Method 2
county_item_id = '076737c0837a4673840303deda826119' # the feature layer
county_zip = r".\Outputs\map\COUNTY.gdb.zip"
item = gis.content.get(county_item_id)
flayer_collection = featureLayerCollection.fromitem(item)
flayer_collection.manager.overwrite(county_zip)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 22:09:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-update-overwrite-feature-layer-using/m-p/1355954#M9356</guid>
      <dc:creator>Josh-R</dc:creator>
      <dc:date>2023-12-01T22:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Update/Overwrite Feature Layer using ArcGIS Python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-update-overwrite-feature-layer-using/m-p/1356006#M9359</link>
      <description>&lt;P&gt;I would add that method #1 works when there is only one feature layer in a geodatabase. There are multiple features in this geodatabase; could this be the reason?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 22:00:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-update-overwrite-feature-layer-using/m-p/1356006#M9359</guid>
      <dc:creator>Josh-R</dc:creator>
      <dc:date>2023-12-01T22:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Update/Overwrite Feature Layer using ArcGIS Python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-update-overwrite-feature-layer-using/m-p/1356231#M9360</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215607"&gt;@Josh-R&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Instead of an overwrite, try a truncate/append:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-online-documents/overwrite-arcgis-online-feature-service-using/ta-p/904457" target="_blank"&gt;https://community.esri.com/t5/arcgis-online-documents/overwrite-arcgis-online-feature-service-using/ta-p/904457&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 12:01:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/unable-to-update-overwrite-feature-layer-using/m-p/1356231#M9360</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2023-12-04T12:01:00Z</dc:date>
    </item>
  </channel>
</rss>

