trying to update hosted feature on ArcGIS Enterprise 10.8.1+ from local GDB
this is the Exception
Exception: 'appendUploadFormat' must be one of the following: shapefile, geojson, csv, featureCollection, excel.
in the API working with fgdb is option ,
this is the function i use for the update what am i missing ?
def append_and_update(agriplots,gdb, url,username,password):
gis = GIS(url = url, username=username, password=password)
layer_for_update = FeatureLayer(agriplots,gis)
print("Uploading File Geodatabase")
fgd_properties={'title':"Temp GDB deleted at the end", 'tags':'temp file geodatabase', 'type':'File Geodatabase'}
gdb_item = gis.content.add(item_properties=fgd_properties, data=gdb + ".zip")
print("updating... ")
result = layer_for_update.append(item_id=gdb_item.id, upload_format="filegdb",source_table_name='AP_WGS84',return_messages=True)
print(result)
delete_result = gdb_item.delete()
print(delete_result)
Did you ever find a solution for this?
I too am getting this error and I'm using a FGDB. Any help would be appreciated!
You posted this back in February, so I'm wondering if you found a solution? I haven't "officially" figured out why we are getting this message, but I have a strong hunch. I bet you're logged into Portal as opposed to AGOL, right? I KNOW; why would there be a difference? Well, when I run my script when connected to AGOL, it works perfectly, but when I'm connected to Portal, NOPE!
So, if someone from ESRI is reading this would you please explain why this is the case? I'm still searching for a Portal solution (Unless you have Big Data and GeoAnalytics, the managed_data append method is out), so if someone knows of one, please let me/us know.
Hello, sorry for a VERY late reply but we have no idea why this is occurring.
We are looking into it and will post a solution here when we have one. In the meantime you can see the supported append formats on a feature layer (both online and enterprise) with:
`feature_layer.properties.supportedAppendFormats`
We don't know why only append formats are being supported on certain feature layers. But this is why you are seeing the error, the format is not supported.
Portal will only allow me to do it with shapefiles...not great!
Any updates on this error? ESRI documentation clearly states that file geodatabases are an acceptable format. We are still running Portal/Server 10.9.1. Potentially that is the source of the issue.
I am running 11.1 and got this error too
Exactly the same issue here. ArcGIS enterprise 10.9.1 fails with "filegdb", although the documentation says it should work.
We are looking at WHY only certain formats are supported but to see what formats are supported on the feature layer you can see it in the properties:
`feature_layer.properties.supportedAppendFormats`
This is more of an Enterprise/Online issue rather than Python API but we will update our error handling on this and also try to understand why.