The ArcGIS API for Python Append method does not maintain attachments when appending a hosted geodatabase to a hosted feature layer. I followed the steps from this tutorial:
https://www.esri.com/arcgis-blog/products/arcgis-online/data-management/keeping-layers-updated-by-appending-features-using-the-arcgis-api-for-python/
My feature has no attachments. I double checked that when I downloaded the hosted filegeodatabase that the attachments were in there.
I do not see an option in Append method to maintain attachments.
@ZacharyNeumannQK can you elaborate on what you did? I found myself here because I'm in the same pickle...records went up fine but attachments have not.
Thanks for the advice. I didn't know arcpy append worked on hosted feature layers but that makes sesne. I ended up using the API for Python and just manually appended the attachments using a table and the add attachments method. Seems to work fine.
But, the tool has an arcpy option, and will work to append to hosted feature layers on AGOL using Pro/Python.
However it will NOT maintain Global ID's, so be carefull if these are needed.
When appending to Hosted Feature Layer(s) in AGOL, from what I can tell, the python API append will preserve the Global ID's just fine, but does not support maintaining attachments.
The arcpy append maintains attachements just fine, but not Global ID's.
So, as important as both of these are, it appears there is no built in way to maintain both attachments and Global ID's without overwriting the HFL itself.
Would hope this gets "fixed" in the future, but since ESRI lists this as a "Known Limitation", most likely will not get addressed. Especially since this limitation was 'known' versions ago.
R_
No it's not. This is for the ArcGIS API for Python. This is not a "tool" in ArcGIS Pro. This is a python method used to append data to a hosted feature layer.
See reference here:
https://developers.arcgis.com/python/api-reference/arcgis.features.html#arcgis.features.FeatureLayer.append
@ZacharyNeumannQK It's an environmental variable on the tool
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.