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")
Any ideas?
DId you ever get this script to work?
Another example / workflow is shared in Kevin's blog post at https://blogs.esri.com/esri/arcgis/2017/03/14/updating-your-hosted-feature-services-with-arcgis-pro-...
Is it possible to pass a SpatialDataFrame as the overwrite parameter? Thus far it seems that the overwrite() function accepts only local data files...
My new csv that has to add features to the feature service has 65k rows. Is this still a good approach to update them, or should I use another technique?
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?