<?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 Publishing Feature Layer to Portal not Overwriting in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/publishing-feature-layer-to-portal-not-overwriting/m-p/1335815#M9118</link>
    <description>&lt;P&gt;I have a Spatially Enabled Data Frame I would like to regularly publish. My expected behavior is that it overwrites. But instead it is creating new hosted feature layers.&lt;/P&gt;&lt;P&gt;I am using an Enterprise Portal not AGOL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;        sedf = GeoAccessor.from_geodataframe(gdf)

        #get the existing item id
        feature_service_id = self.gis.content.search(query=f"title:{name}", item_type="Feature Service")[0].id
        logging.info(f"feature_service_id: {feature_service_id}")

        #publish as a feature layer 
        hosted_feature_lyr = sedf.spatial.to_featurelayer(title=name, 
                                                          gis=self.gis, 
                                                          tags="",
                                                          overwrite=True,
                                                          service={'featureServiceId': feature_service_id, 'layer': 0}
                                                         )
        #update the description and tags, or other properties.
        update_dict = {'description': f"Updated {datetime.now()}.", 
                       'tags': [ f'{datetime.now().year}']
                       }
        hosted_feature_lyr.update(item_properties=update_dict)

        #share the feature layer with the organization
        hosted_feature_lyr.share(everyone=False, org=True)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;How can I get it to overwrite instead of making new feature layers?&lt;/P&gt;</description>
    <pubDate>Fri, 06 Oct 2023 15:55:57 GMT</pubDate>
    <dc:creator>SteveScott1</dc:creator>
    <dc:date>2023-10-06T15:55:57Z</dc:date>
    <item>
      <title>Publishing Feature Layer to Portal not Overwriting</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/publishing-feature-layer-to-portal-not-overwriting/m-p/1335815#M9118</link>
      <description>&lt;P&gt;I have a Spatially Enabled Data Frame I would like to regularly publish. My expected behavior is that it overwrites. But instead it is creating new hosted feature layers.&lt;/P&gt;&lt;P&gt;I am using an Enterprise Portal not AGOL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;        sedf = GeoAccessor.from_geodataframe(gdf)

        #get the existing item id
        feature_service_id = self.gis.content.search(query=f"title:{name}", item_type="Feature Service")[0].id
        logging.info(f"feature_service_id: {feature_service_id}")

        #publish as a feature layer 
        hosted_feature_lyr = sedf.spatial.to_featurelayer(title=name, 
                                                          gis=self.gis, 
                                                          tags="",
                                                          overwrite=True,
                                                          service={'featureServiceId': feature_service_id, 'layer': 0}
                                                         )
        #update the description and tags, or other properties.
        update_dict = {'description': f"Updated {datetime.now()}.", 
                       'tags': [ f'{datetime.now().year}']
                       }
        hosted_feature_lyr.update(item_properties=update_dict)

        #share the feature layer with the organization
        hosted_feature_lyr.share(everyone=False, org=True)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;How can I get it to overwrite instead of making new feature layers?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 15:55:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/publishing-feature-layer-to-portal-not-overwriting/m-p/1335815#M9118</guid>
      <dc:creator>SteveScott1</dc:creator>
      <dc:date>2023-10-06T15:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Publishing Feature Layer to Portal not Overwriting</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/publishing-feature-layer-to-portal-not-overwriting/m-p/1336729#M9130</link>
      <description>&lt;P&gt;Hey, I think I may be reproducing your issue. I'll have to dig into further to see if there's anything you can do, but I think logging a case with Esri Support may be a good idea.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 20:30:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/publishing-feature-layer-to-portal-not-overwriting/m-p/1336729#M9130</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2023-10-10T20:30:19Z</dc:date>
    </item>
  </channel>
</rss>

