<?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: Publishing multiple shapefiles to single Hosted Feature Service in Portal  in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/publishing-multiple-shapefiles-to-single-hosted/m-p/775405#M913</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jake,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your suggestion and for providing your code! It looks well implemented and I'm sure I'll be able to use some of the logic for future projects.&amp;nbsp;But in this case, since we are receiving a zip with multiple shapes from the file server,&amp;nbsp;we would have to&amp;nbsp;download and unzip the files anyway before running them through your script so since we've decided to simply use arcpy.merge_management() on them before zipping them again and using the API as in my code above to publish a single&amp;nbsp;HFS. That workflow runs very fast and setting up cleanup was very easy. May be a little old school but it works fine!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Apr 2018 09:13:41 GMT</pubDate>
    <dc:creator>DanielMast</dc:creator>
    <dc:date>2018-04-27T09:13:41Z</dc:date>
    <item>
      <title>Publishing multiple shapefiles to single Hosted Feature Service in Portal</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/publishing-multiple-shapefiles-to-single-hosted/m-p/775403#M911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a script tool using the Python API that receives a list of Urls to zip files on a server with multiple shape files inside. Each zip file contains exactly the same number of shapefiles with the same names and schemas. I would like to publish all the shapefiles to a single Hosted Feature Service in Portal but I cannot find any way to publish multiple files together or to merge the shapefiles or Hosted Feature Services once created. Is there a supported workflow for doing this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment I am doing this to end up with one Hosted Feature Service per shapefile:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #cc7832;"&gt;for &lt;/SPAN&gt;zip_Url &lt;SPAN style="color: #cc7832;"&gt;in &lt;/SPAN&gt;zip_Url_List:
&amp;nbsp;&amp;nbsp;&amp;nbsp; shp_file = gis.content.add(item_Properties&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;zip_Url)
&amp;nbsp;&amp;nbsp;&amp;nbsp; published_service = shp_file.publish()&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;shp_file.delete()&lt;/PRE&gt;&lt;P&gt;I found the function append() on a Feature Layer in the &lt;A href="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.toc.html#arcgis.features.FeatureLayer.append" rel="nofollow noopener noreferrer" target="_blank"&gt;API documentation&amp;nbsp;&lt;/A&gt;but it seems this is only available for AGOL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only workaround I can see is to download all the shapefiles locally, unzip them, merge the shapes with same names using arcpy, zip them again, add the shapefiles, and publish the services but this would add&amp;nbsp;potentially very long processing times since some of the shapefiles can be quite big. This tool is meant to run on a button click in a web application so performance is important to not keep the user waiting any longer than necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for any recommendations&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:41:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/publishing-multiple-shapefiles-to-single-hosted/m-p/775403#M911</guid>
      <dc:creator>DanielMast</dc:creator>
      <dc:date>2021-12-12T08:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Publishing multiple shapefiles to single Hosted Feature Service in Portal</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/publishing-multiple-shapefiles-to-single-hosted/m-p/775404#M912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recently created a tool that will append features from a shapefile/feature class to a hosted feature service (AGOL or Portal):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/docs/DOC-11621-update-hosted-feature-service-with-feature-class"&gt;https://community.esri.com/docs/DOC-11621-update-hosted-feature-service-with-feature-class&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if it will be helpful, but you may be able to incorporate this functionality into your workflow.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2018 12:45:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/publishing-multiple-shapefiles-to-single-hosted/m-p/775404#M912</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2018-04-18T12:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Publishing multiple shapefiles to single Hosted Feature Service in Portal</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/publishing-multiple-shapefiles-to-single-hosted/m-p/775405#M913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jake,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your suggestion and for providing your code! It looks well implemented and I'm sure I'll be able to use some of the logic for future projects.&amp;nbsp;But in this case, since we are receiving a zip with multiple shapes from the file server,&amp;nbsp;we would have to&amp;nbsp;download and unzip the files anyway before running them through your script so since we've decided to simply use arcpy.merge_management() on them before zipping them again and using the API as in my code above to publish a single&amp;nbsp;HFS. That workflow runs very fast and setting up cleanup was very easy. May be a little old school but it works fine!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2018 09:13:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/publishing-multiple-shapefiles-to-single-hosted/m-p/775405#M913</guid>
      <dc:creator>DanielMast</dc:creator>
      <dc:date>2018-04-27T09:13:41Z</dc:date>
    </item>
  </channel>
</rss>

