Hi There.
I am trying to use the ArcGIS python API to overwrite an AGOL hosted feature table that i own. The process seems to work, i.e. the FeatureLayerCollection.manager.overwrite() method returns {'success': True}, but the data in the AGOL hosted table are not updated. The items detail page of the hosted feature table indicates that it was updated at the same time as my log file indicates that the overwrite() operation completed. So all indications are that the overwrite worked, except for the data.
(from Item Details page)
(from my log file)
If i update the hosted table via the AGOL UI, the process works as expected - the new data are present in the table.
The table was originally created by publishing a csv file to AGOL. The csv file i am using to overwrite the existing hosted table has the same name and schema as the original file.
my conda environment is using arcgis v2.1.0.2.
Any ideas what's going on?
files_to_update = json.loads((settings.SURVEY_LOOKUP_TABLES_TO_UPDATE).replace('\n',''))
for file in files_to_update:
lookup_file = update_survey_lookup_file(settings.SURVEY_LOOKUP_FILES_LOCAL_SOURCE, file)
lookup_table = gis.content.get(file['agolItemId'])
lookup_collection = FeatureLayerCollection.fromitem(lookup_table)
LOGGER.debug("Start to overwrite AGOL table with " + lookup_file)
response = lookup_collection.manager.overwrite(lookup_file)
LOGGER.debug("the response from the overwrite operation: " + str(response))
LOGGER.debug("Done with overwrite of AGOL table with " + lookup_file)
lookup_table.update(item_properties = {"title" : file['agolTitle']})