Overwrite Service: Data and Symbology Mismatch (ArcGIS Pro vs ArcGIS API for Python)

1871
2
Jump to solution
07-24-2021 10:31 AM
GB_MattPanunto_GISS
Occasional Contributor II

I've published a hosted service (feature layer) by uploading a GDB. With that, I can easily update this service via Python by specifying a new GDB as a parameter in the overwrite command.

However, I wanted to apply some symbology to the service layers using ArcGIS Pro. So after initially creating the service by uploading the GDB, I then loaded the GDB feature classes into ArcGIS Pro, applied my symbology, then overwrote the service. I also made sure that the layers were listed in my Table of Contents in a layer order that matched the existing service, and had the exact same layer names. After this overwrite, things look great.

Now that the symbology is set, I want to automate the update of this service via Python by specifying a new updated GDB in the script. When I do this, the service does successfully update, but the layers are now out of order, and the symbology is mismatched as a result.

I can't figure out what is causing the layer order to change when overwriting via Python using a new GDB? The feature classes are exactly the same as the initial service publish. The feature class names, and schemas are also identical, and the only difference is that there are more features inside of the new feature classes.

Clearly something must be getting scrambled by using the two different overwrite methods of the same service, but I can't seem to get a handle on it.

0 Kudos
1 Solution

Accepted Solutions
GB_MattPanunto_GISS
Occasional Contributor II
0 Kudos
2 Replies
emedina
New Contributor III

How much data are we talking about here? Do you think you could get away with appending new data to the service layers so as to preserve the order and your symbology?

0 Kudos
GB_MattPanunto_GISS
Occasional Contributor II
0 Kudos