<?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 Create Watersheds Output Not Appending in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/create-watersheds-output-not-appending/m-p/1330850#M9034</link>
    <description>&lt;P&gt;I'm iterating through a list of points creating a watershed for each one using the Python API and ArcGIS Online.&amp;nbsp; I would like the outputs to be appended into one feature layer.&amp;nbsp; &amp;nbsp; The documentation states for output&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Optional string or&amp;nbsp;&lt;/SPAN&gt;&lt;A title="arcgis.features.FeatureLayer" href="https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html#arcgis.features.FeatureLayer" target="_blank" rel="noopener"&gt;&lt;SPAN class=""&gt;FeatureLayer&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;. Existing feature layer will cause the new layer to be appended to the Feature Service. If overwrite is True in context, new layer will overwrite existing layer. If output_name not indicated then new&amp;nbsp;&lt;/SPAN&gt;&lt;A title="arcgis.features.FeatureCollection" href="https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html#arcgis.features.FeatureCollection" target="_blank" rel="noopener"&gt;&lt;SPAN class=""&gt;FeatureCollection&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;created.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So in the code line&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;lakes_watershed = create_watersheds(feat_collect, output_name= "Created_watersheds")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;when it gets to the second feature to create a watershed for a I get&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;{"messageCode": "AO_100292", "message": "The provided output name is already in use or contains invalid characters."}
{"messageCode": "AO_100123", "message": "CreateWatersheds failed."}
Failed to execute (CreateWatersheds).
Failed.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm iterating through the table because there are 466 records.&amp;nbsp; If I do it for the entire feature layer at once it bombs out.&amp;nbsp; With this method, I can catch the error for each point.&amp;nbsp; Maybe there a better way?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any idea what I'm doing wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Sep 2023 21:11:51 GMT</pubDate>
    <dc:creator>bkaplan1</dc:creator>
    <dc:date>2023-09-20T21:11:51Z</dc:date>
    <item>
      <title>Create Watersheds Output Not Appending</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/create-watersheds-output-not-appending/m-p/1330850#M9034</link>
      <description>&lt;P&gt;I'm iterating through a list of points creating a watershed for each one using the Python API and ArcGIS Online.&amp;nbsp; I would like the outputs to be appended into one feature layer.&amp;nbsp; &amp;nbsp; The documentation states for output&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Optional string or&amp;nbsp;&lt;/SPAN&gt;&lt;A title="arcgis.features.FeatureLayer" href="https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html#arcgis.features.FeatureLayer" target="_blank" rel="noopener"&gt;&lt;SPAN class=""&gt;FeatureLayer&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;. Existing feature layer will cause the new layer to be appended to the Feature Service. If overwrite is True in context, new layer will overwrite existing layer. If output_name not indicated then new&amp;nbsp;&lt;/SPAN&gt;&lt;A title="arcgis.features.FeatureCollection" href="https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html#arcgis.features.FeatureCollection" target="_blank" rel="noopener"&gt;&lt;SPAN class=""&gt;FeatureCollection&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;created.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So in the code line&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;lakes_watershed = create_watersheds(feat_collect, output_name= "Created_watersheds")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;when it gets to the second feature to create a watershed for a I get&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;{"messageCode": "AO_100292", "message": "The provided output name is already in use or contains invalid characters."}
{"messageCode": "AO_100123", "message": "CreateWatersheds failed."}
Failed to execute (CreateWatersheds).
Failed.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm iterating through the table because there are 466 records.&amp;nbsp; If I do it for the entire feature layer at once it bombs out.&amp;nbsp; With this method, I can catch the error for each point.&amp;nbsp; Maybe there a better way?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any idea what I'm doing wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 21:11:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/create-watersheds-output-not-appending/m-p/1330850#M9034</guid>
      <dc:creator>bkaplan1</dc:creator>
      <dc:date>2023-09-20T21:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Create Watersheds Output Not Appending</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/create-watersheds-output-not-appending/m-p/1331019#M9040</link>
      <description>&lt;P&gt;Hey, if I'm reading the documentation correctly then if you want everything appended to a FeatureLayer you need to supply a FeatureLayer object, not string to &lt;FONT face="courier new,courier"&gt;output_name&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;Seems like the failed process already created an initial Feature Layer for you? Use that for&amp;nbsp;&lt;FONT face="courier new,courier"&gt;output_name&amp;nbsp;&lt;/FONT&gt;and see what happens.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 13:36:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/create-watersheds-output-not-appending/m-p/1331019#M9040</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2023-09-21T13:36:58Z</dc:date>
    </item>
  </channel>
</rss>

