<?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: Upload against a Hosted Feature Service? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-against-a-hosted-feature-service/m-p/807106#M2326</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;it by delete the zipped FGDB item after the update&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can actually bypass the above approach of uploading directly to the portal as an item (still a very valid approach for appending) and upload your fGDB directly against a hosted feature service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Benefit is that this data is manually cleaned automatically by the back-end Server and no reliance on you having to delete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/436110_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appending definitely supports using this via the &lt;A href="https://developers.arcgis.com/rest/services-reference/append-feature-service-layer-.htm"&gt;appendUploadID &lt;/A&gt;parameter on the REST endpoint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But with the Python API:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Cant spot anything that might help me upload to begin with&lt;/LI&gt;&lt;LI&gt;The append method does not have an equivalent appendUploadID, just a Portal Item ID -&amp;nbsp;&lt;SPAN style="color: #404040; background-color: #f3f6f6;"&gt;item_id&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am ok working around this by using the requests module, but might be worth including in a future release?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f3f6f6; color: #3d3d3d; "&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Jan 2019 10:22:38 GMT</pubDate>
    <dc:creator>SimonJackson</dc:creator>
    <dc:date>2019-01-30T10:22:38Z</dc:date>
    <item>
      <title>Upload against a Hosted Feature Service?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-against-a-hosted-feature-service/m-p/807102#M2322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;I have a polygon featureclass in a local file Geodatabase.&lt;/LI&gt;&lt;LI&gt;I want to Append-Upsert this against an existing Hosted Feature Service in AGO (same schema)&lt;/LI&gt;&lt;LI&gt;I know that you can upload the fGDB against the hosted feature service and then use this in an Append with &lt;A href="https://developers.arcgis.com/rest/services-reference/append-feature-service-layer-.htm"&gt;appendUploadId&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;I might be missing it, but the the ArcGIS Python API seems to be missing this capability - to perform an upload against an existing hosted feature service?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know there are other options:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Upload the fGDB to the portal as an item, and then use this in an append (prefer to avoid this approach)&lt;/LI&gt;&lt;LI&gt;Convert the layer to a featurecollection and pass this in directly with the &lt;A href="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.toc.html?highlight=append#arcgis.features.FeatureLayer.append"&gt;edits param&lt;/A&gt; on append&amp;nbsp;&lt;UL&gt;&lt;LI&gt;Not entirely sure how to convert my featureclass to a featurecollection (?) in order to do this, happy to attempt this approach as then I can skip out on any uploading.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any pointers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2019 10:36:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-against-a-hosted-feature-service/m-p/807102#M2322</guid>
      <dc:creator>SimonJackson</dc:creator>
      <dc:date>2019-01-24T10:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Upload against a Hosted Feature Service?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-against-a-hosted-feature-service/m-p/807103#M2323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Simon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this what you are looking?&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.toc.html#arcgis.features.FeatureLayer.append" title="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.toc.html#arcgis.features.FeatureLayer.append"&gt;arcgis.features module — arcgis 1.5.2 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you can use edit_features(adds=None, updates=None,....)&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.toc.html#arcgis.features.FeatureLayer.edit_features" title="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.toc.html#arcgis.features.FeatureLayer.edit_features"&gt;arcgis.features module — arcgis 1.5.2 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is an example for it&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/sample-notebooks/updating-features-in-a-feature-layer/#Perform-updates-to-the-existing-features" title="https://developers.arcgis.com/python/sample-notebooks/updating-features-in-a-feature-layer/#Perform-updates-to-the-existing-features"&gt;updating_features_in_a_feature_layer | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope these information are useful for you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2019 02:05:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-against-a-hosted-feature-service/m-p/807103#M2323</guid>
      <dc:creator>simoxu</dc:creator>
      <dc:date>2019-01-30T02:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Upload against a Hosted Feature Service?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-against-a-hosted-feature-service/m-p/807104#M2324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey again Simo&lt;/P&gt;&lt;P&gt;No its not so much the actual appending, its the uploading of a fGDB against the Hosted Feature Service itself (as opposed to an item in the portal) which I cant spot an easy way of doing without&amp;nbsp;using the requests library and working directly with the REST endpoint.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will see if I can share some code.&amp;nbsp; &lt;A href="https://github.com/bgtdevhub/tfnsw-ago-lambda/blob/master/routes/routes.js#L176"&gt;Here &lt;/A&gt;is a Javascript equivalent.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2019 02:09:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-against-a-hosted-feature-service/m-p/807104#M2324</guid>
      <dc:creator>SimonJackson</dc:creator>
      <dc:date>2019-01-30T02:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Upload against a Hosted Feature Service?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-against-a-hosted-feature-service/m-p/807105#M2325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Simon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems we have to do it in two steps:&lt;/P&gt;&lt;P&gt;Step 1: update the File Geodatabase item&lt;/P&gt;&lt;P&gt;Step 2: use the File Geodatabase item to update the Feature Service via append function which supports upsert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did a quick test here, and it seems works fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/436093_append.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be good if we can update the feature service using zipped FGDB directly. and I don't know why the API doesn't. Hope someone from the development team can comment on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But we can workaround it by delete the zipped FGDB item after the update. I am just guessing, it really depends on your own workflow&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2019 07:58:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-against-a-hosted-feature-service/m-p/807105#M2325</guid>
      <dc:creator>simoxu</dc:creator>
      <dc:date>2019-01-30T07:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Upload against a Hosted Feature Service?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-against-a-hosted-feature-service/m-p/807106#M2326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;it by delete the zipped FGDB item after the update&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can actually bypass the above approach of uploading directly to the portal as an item (still a very valid approach for appending) and upload your fGDB directly against a hosted feature service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Benefit is that this data is manually cleaned automatically by the back-end Server and no reliance on you having to delete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/436110_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appending definitely supports using this via the &lt;A href="https://developers.arcgis.com/rest/services-reference/append-feature-service-layer-.htm"&gt;appendUploadID &lt;/A&gt;parameter on the REST endpoint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But with the Python API:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Cant spot anything that might help me upload to begin with&lt;/LI&gt;&lt;LI&gt;The append method does not have an equivalent appendUploadID, just a Portal Item ID -&amp;nbsp;&lt;SPAN style="color: #404040; background-color: #f3f6f6;"&gt;item_id&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am ok working around this by using the requests module, but might be worth including in a future release?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f3f6f6; color: #3d3d3d; "&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2019 10:22:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-against-a-hosted-feature-service/m-p/807106#M2326</guid>
      <dc:creator>SimonJackson</dc:creator>
      <dc:date>2019-01-30T10:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Upload against a Hosted Feature Service?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-against-a-hosted-feature-service/m-p/807107#M2327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see.&lt;/P&gt;&lt;P&gt;There is a method called &lt;STRONG&gt;upload&lt;/STRONG&gt; for the FeatureLayerCollection class.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.toc.html#arcgis.features.FeatureLayerCollection.upload" title="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.toc.html#arcgis.features.FeatureLayerCollection.upload"&gt;arcgis.features module — arcgis 1.5.2 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the &lt;STRONG&gt;append&lt;/STRONG&gt; function for FeatureLayer does not have a upload_id parameter, and in the source code I can see the upload_id was intentionally set to None. So I assume the upload_id was deliberately disabled for the function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2019 04:12:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-against-a-hosted-feature-service/m-p/807107#M2327</guid>
      <dc:creator>simoxu</dc:creator>
      <dc:date>2019-01-31T04:12:35Z</dc:date>
    </item>
  </channel>
</rss>

