<?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 web feature layer in model builder- avoid duplicates in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/append-web-feature-layer-in-model-builder-avoid/m-p/1104406#M46312</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/460092"&gt;@LucileFayolle&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;If you &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/exporting-a-model-to-python.htm" target="_self"&gt;export your model to a python script&lt;/A&gt;, you can leverage the ArcGIS API for Python.&amp;nbsp; With this module you can use the truncate method, which is much faster than Delete Rows.&amp;nbsp; Ex:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
from arcgis import GIS

# Variables
portal = 'https://portal.esri.com/portal'         # Portal URL
username = 'portaladmin'                          # portal username
password = '********'                             # portal username password
fsItemId = '7b51dcf43c3847ecabf850c607bca967'     # item id of hosted feature service

# Sign Into Portal
gis = GIS(portal, username, password, verify=False)

# Truncate Hosted Feature Service
hostedFlyr = gis.content.get(fsItemId)
fLyr = hostedFlyr.layers[0]
fLyr.manager.truncate()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Oct 2021 14:45:01 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2021-10-04T14:45:01Z</dc:date>
    <item>
      <title>Append web feature layer in model builder- avoid duplicates</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/append-web-feature-layer-in-model-builder-avoid/m-p/1104295#M46296</link>
      <description>&lt;P&gt;I have a model to update the data of a hosted web feature layer.&lt;/P&gt;&lt;P&gt;Problem is: a big part of the 'new' data are&lt;U&gt; identical&lt;/U&gt; to the 'already existing' dataset. So, to update the layer and limit the duplicate I use the tool &lt;STRONG&gt;Delete Rows&lt;/STRONG&gt; on the web layer, then &lt;STRONG&gt;Append&lt;/STRONG&gt;. Just the delete rows takes 10min on my computer and with time the dataset will grow quickly..&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is there an easier and quicker way to append just the new data in the web layer?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;May be the use of &lt;STRONG&gt;Dissolve&lt;/STRONG&gt; before the Append?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 05:21:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/append-web-feature-layer-in-model-builder-avoid/m-p/1104295#M46296</guid>
      <dc:creator>LucileFayolle</dc:creator>
      <dc:date>2021-10-04T05:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Append web feature layer in model builder- avoid duplicates</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/append-web-feature-layer-in-model-builder-avoid/m-p/1104406#M46312</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/460092"&gt;@LucileFayolle&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;If you &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/exporting-a-model-to-python.htm" target="_self"&gt;export your model to a python script&lt;/A&gt;, you can leverage the ArcGIS API for Python.&amp;nbsp; With this module you can use the truncate method, which is much faster than Delete Rows.&amp;nbsp; Ex:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
from arcgis import GIS

# Variables
portal = 'https://portal.esri.com/portal'         # Portal URL
username = 'portaladmin'                          # portal username
password = '********'                             # portal username password
fsItemId = '7b51dcf43c3847ecabf850c607bca967'     # item id of hosted feature service

# Sign Into Portal
gis = GIS(portal, username, password, verify=False)

# Truncate Hosted Feature Service
hostedFlyr = gis.content.get(fsItemId)
fLyr = hostedFlyr.layers[0]
fLyr.manager.truncate()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 14:45:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/append-web-feature-layer-in-model-builder-avoid/m-p/1104406#M46312</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-10-04T14:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Append web feature layer in model builder- avoid duplicates</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/append-web-feature-layer-in-model-builder-avoid/m-p/1105787#M46461</link>
      <description>&lt;P&gt;Thanks for that!&lt;/P&gt;&lt;P&gt;I never used the ArcGIS API for Python, will give it a try.&lt;/P&gt;&lt;P&gt;I also find a way to script a tool to Overwrite web layer but have some trouble with it, so I may try this.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 03:51:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/append-web-feature-layer-in-model-builder-avoid/m-p/1105787#M46461</guid>
      <dc:creator>LucileFayolle</dc:creator>
      <dc:date>2021-10-08T03:51:45Z</dc:date>
    </item>
  </channel>
</rss>

