<?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: Working with Hosted feature layers in Python in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/working-with-hosted-feature-layers-in-python/m-p/1276196#M8586</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/612016"&gt;@avonmoos&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my case I am getting a feature class with new records that have to be append to the hosted feature class.&lt;/P&gt;&lt;P&gt;Does this line append the hosted feature with records?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;# Use the feature set to update the feature layer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;layer.edit_features(updates=feature_set)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Apr 2023 15:46:19 GMT</pubDate>
    <dc:creator>JoseSanchez</dc:creator>
    <dc:date>2023-04-06T15:46:19Z</dc:date>
    <item>
      <title>Working with Hosted feature layers in Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/working-with-hosted-feature-layers-in-python/m-p/1273789#M8564</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;Anyone can recommend samples of Python source code updating hosted feature layers?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Jose&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 19:41:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/working-with-hosted-feature-layers-in-python/m-p/1273789#M8564</guid>
      <dc:creator>SanchezNuñez</dc:creator>
      <dc:date>2023-03-30T19:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Hosted feature layers in Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/working-with-hosted-feature-layers-in-python/m-p/1273922#M8565</link>
      <description>&lt;P&gt;There's plenty of documentation, like here:&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/guide/appending-features/" target="_blank"&gt;https://developers.arcgis.com/python/guide/appending-features/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 23:49:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/working-with-hosted-feature-layers-in-python/m-p/1273922#M8565</guid>
      <dc:creator>Jacob_Helfman</dc:creator>
      <dc:date>2023-03-30T23:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Hosted feature layers in Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/working-with-hosted-feature-layers-in-python/m-p/1274031#M8567</link>
      <description>&lt;P&gt;Thank you Jacob!&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 11:43:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/working-with-hosted-feature-layers-in-python/m-p/1274031#M8567</guid>
      <dc:creator>JoseSanchez</dc:creator>
      <dc:date>2023-03-31T11:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Hosted feature layers in Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/working-with-hosted-feature-layers-in-python/m-p/1275563#M8583</link>
      <description>&lt;P&gt;import arcgis&lt;BR /&gt;from arcgis.gis import GIS&lt;/P&gt;&lt;P&gt;# Connect to your ArcGIS Online organization&lt;BR /&gt;gis = GIS("&lt;A href="https://www.arcgis.com" target="_blank"&gt;https://www.arcgis.com&lt;/A&gt;", "username", "password")&lt;/P&gt;&lt;P&gt;# Get the feature layer you want to update&lt;BR /&gt;layer = gis.content.get("feature_layer_item_id").layers[0]&lt;/P&gt;&lt;P&gt;# Create a feature set object containing the features you want to update&lt;BR /&gt;feature_set = arcgis.features.FeatureSet.from_csv("path_to_csv_file")&lt;/P&gt;&lt;P&gt;# Use the feature set to update the feature layer&lt;BR /&gt;layer.edit_features(updates=feature_set)&lt;/P&gt;&lt;P&gt;print("Feature layer updated successfully!")&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 22:09:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/working-with-hosted-feature-layers-in-python/m-p/1275563#M8583</guid>
      <dc:creator>avonmoos</dc:creator>
      <dc:date>2023-04-04T22:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Hosted feature layers in Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/working-with-hosted-feature-layers-in-python/m-p/1276196#M8586</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/612016"&gt;@avonmoos&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my case I am getting a feature class with new records that have to be append to the hosted feature class.&lt;/P&gt;&lt;P&gt;Does this line append the hosted feature with records?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;# Use the feature set to update the feature layer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;layer.edit_features(updates=feature_set)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 15:46:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/working-with-hosted-feature-layers-in-python/m-p/1276196#M8586</guid>
      <dc:creator>JoseSanchez</dc:creator>
      <dc:date>2023-04-06T15:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Hosted feature layers in Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/working-with-hosted-feature-layers-in-python/m-p/1276384#M8587</link>
      <description>&lt;P&gt;If you're looking to append then give this a try...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import arcgis&lt;/P&gt;&lt;P&gt;# Set the URL of your ArcGIS Online organization&lt;BR /&gt;portal_url = "&lt;A href="https://www.arcgis.com/" target="_blank"&gt;https://www.arcgis.com/&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;# Set the credentials for your ArcGIS Online account&lt;BR /&gt;username = "&amp;lt;username&amp;gt;"&lt;BR /&gt;password = "&amp;lt;password&amp;gt;"&lt;/P&gt;&lt;P&gt;# Set the ID of the feature service you want to update&lt;BR /&gt;service_id = "&amp;lt;service_id&amp;gt;"&lt;/P&gt;&lt;P&gt;# Set the name of the feature class in your geodatabase that you want to update the service with&lt;BR /&gt;fc_name = "&amp;lt;feature_class_name&amp;gt;"&lt;/P&gt;&lt;P&gt;# Connect to your ArcGIS Online organization&lt;BR /&gt;gis = arcgis.gis.GIS(portal_url, username, password)&lt;/P&gt;&lt;P&gt;# Get the feature service&lt;BR /&gt;feature_service = arcgis.features.FeatureLayerCollection.fromitem(gis.content.get(service_id))&lt;/P&gt;&lt;P&gt;# Get the feature layer from the feature service&lt;BR /&gt;feature_layer = feature_service.layers[0]&lt;/P&gt;&lt;P&gt;# Get the feature class from the geodatabase&lt;BR /&gt;feature_class = arcgis.features.FeatureSet.from_featureclass(fc_name)&lt;/P&gt;&lt;P&gt;# Update the feature service with the feature set&lt;BR /&gt;feature_layer.edit_features(updates=feature_class)&lt;/P&gt;&lt;P&gt;# Disconnect from the ArcGIS Online organization&lt;BR /&gt;gis = None&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 21:46:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/working-with-hosted-feature-layers-in-python/m-p/1276384#M8587</guid>
      <dc:creator>avonmoos</dc:creator>
      <dc:date>2023-04-06T21:46:11Z</dc:date>
    </item>
  </channel>
</rss>

