problem update hosted feature in portal

607
7
02-15-2023 06:23 AM
Labels (1)
OrrGvili
New Contributor III

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)
0 Kudos
7 Replies
LSaunders
New Contributor III

Did you ever find a solution for this?

0 Kudos
AnthonyAtkins2
New Contributor III

I too am getting this error and I'm using a FGDB. Any help would be appreciated!

0 Kudos
AnthonyAtkins2
New Contributor III

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.

0 Kudos
LSaunders
New Contributor III

Portal will only allow me to do it with shapefiles...not great!

0 Kudos
JeredHansenNPS
New Contributor

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. 

0 Kudos
AiminFan1
New Contributor II

I am running 11.1 and got this error too

0 Kudos
MiguelVillafranca
New Contributor

Exactly the same issue here. ArcGIS enterprise 10.9.1 fails with "filegdb", although the documentation says it should work.

0 Kudos