How can I overwrite a layer of my portal using arcpy?

207
1
03-16-2023 08:51 AM
PabloIbañez
New Contributor

Hello everyone. Here is my situation:

I have a 'Map Image Layer' service published from ArcGIS Pro on my portal (not copied, but referenced) and stored on my computer.
This 'Map Image Layer' stored on my computer is updated from time to time by including and deleting a series of records that I modify with the 'cursor' tool. Until relatively recently, the update of the layer stored on my computer was displayed without having to do anything else in all the sites to which the layer is linked, for example in mapviewer or in the dashboards that use it.
The problem is that now it no longer shows updates to the layer that are made on my computer in the cloud (ArcGIS Enterprise) and I have to manually overwrite this service, which is tedious given the large number of times it is updated.

How can I go about automating this process? I have tried several options that I have found on different blogs but I can't get any of them to work.

Thank you very much!

0 Kudos
1 Reply
Hibby
by
New Contributor II
Don't overwrite, truncate and append.
0 Kudos