Arcpy tool for modifying the source of a query layer?

134
2
Jump to solution
12-03-2021 02:20 PM
AmyRoust
Occasional Contributor III

I have a Pro project with 16 maps that each contain 6 layers. All of the layers are query layers pulling data from the same SQL database. Next month, the database is going to be moved to a production server, which means that I need to change the connection that all 96 layers use. Needless to say, I am not looking forward to that many clicks! Is there something in the arcpy library that I could use to script out the process of repointing these layers? I've never used a script to modify a Pro project before, so I'm mainly looking for ideas on where to start.

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor
0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

Updating and fixing data sources—ArcGIS Pro | Documentation

seems to be the place to start


... sort of retired...
0 Kudos
AmyRoust
Occasional Contributor III

Thank you, Dan! That's exactly what I needed. I am pleased to find that it works on query layers without any modifications, too.

0 Kudos