I am trying to figure out how to update a feature service hosted on arcgis online using the arcgis api for python. Essentially, every morning I would like to run a script that takes new features from a feature class on our organizations egdb and update a replica of the feature service on AGOL.
Is this possible?
Solved! Go to Solution.
When trying to use the overwrite() function, my code returns the following error:
AttributeError: 'FeatureLayerCollection' object has no attribute 'managers'
My code looks like the following:
gis = GIS(username=username, password=password)
fs = gis.content.get('idoffeatureservice')
flc = FeatureLayerCollection.fromitem(fs)
flc.manager.overwrite("path to feature class inside an FGDB")
I have similar requirement to update a hosted feature layer in AGOL using scheduled python script.
My source data is stored in an SDE DB. What is the best way to achieve that in 2021?