I know there are other options:
Thanks for any pointers.
it by delete the zipped FGDB item after the update
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.
Benefit is that this data is manually cleaned automatically by the back-end Server and no reliance on you having to delete.
Appending definitely supports using this via the appendUploadID parameter on the REST endpoint.
But with the Python API:
I am ok working around this by using the requests module, but might be worth including in a future release?
Hello Simon,
It seems we have to do it in two steps:
Step 1: update the File Geodatabase item
Step 2: use the File Geodatabase item to update the Feature Service via append function which supports upsert.
I did a quick test here, and it seems works fine.
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.
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
Cheers
Hey again Simo
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 using the requests library and working directly with the REST endpoint.
Will see if I can share some code. Here is a Javascript equivalent.
Hi Simon,
Is this what you are looking?
arcgis.features module — arcgis 1.5.2 documentation
Or you can use edit_features(adds=None, updates=None,....)
There is an example for it
updating_features_in_a_feature_layer | ArcGIS for Developers
Hope these information are useful for you
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.