I am trying to write a Python script to simply overwrite a feature layer to ArcGIS Online. I have read some other GeonNet posts, and took a look at the Python API, but still can't find a good example for what I'm trying to do.
The script would just overwrite the feature service in ArcGIS Online using the same local data source each time the script is run. The dataset is changing on our system weekly. But the service is published in ArcGIS Online because it gets a lot of traffic, and they can better handle scaling than our local server environment.
If ArcGIS Pro would let you run this process as a geoprocessing tool, then I could just copy the Python code snippet. Any tips or sample code would be very helpful.
Here is a walk-through of the manual process:
Launch ArcGIS Pro document that contains local data source > sign-in to ArcGIS Online > manually overwrite feature service > close ArcGIS Pro.
By the way, I am open to ArcMap/Python 2 solution to this. Though I do prefer a Python 3 approach.
Solved! Go to Solution.
That is exactly what I was looking for. I was at a lost as to how to update the service definition associated with the existing service. I was definitely on the right track.