Switching Data Sources in ArcGIS Pro

2827
10
05-11-2018 10:17 AM
Status: Open
Labels (1)
Occasional Contributor III

I'd like to be able to switch data sources without the data being "lost" in my maps and layouts.

For example, if I have a features class driving some data on multiple maps I want to be able to update that data source in my database and then have my maps/layouts that point to that data source dynamically update while keeping my symbology and labels intact.  

This is how swapping data sources in ArcMap worked (assuming all field names remained the same). 

Right now in ArcGIS Pro even if all of your fields are the same when you swap data out and open a layout or map the data is rarely "recognized".   This requires me to re-import symbology and re-label my features which is not efficient or practical with multiple layouts hitting the same data.  

10 Comments

Sean, can you provide some more detail around 

I want to be able to update that data source in my database 

The layers in your maps are pointing to a data source.  My understanding is that you're not switching the data source of the layer, but "updating" the database table.  What do you mean by updating?  Appending data?  Truncating the table and adding all new feature?  Deleting the table completely, and adding a new table called the same thing?

It would be important to understand how this is breaking because upon my initial read I wouldn't think that it should...

Thanks!

Kory,

I’ve had a chance to experiment with this some more. Let me explain what I’m doing and maybe you can offer a better way to accomplish the same thing:

I’d like to be able to open catalog view and replace a feature class that a series of layouts or maps use. Typically, I’d rename that feature class featureclass_OLD and the new feature class: featureclass.

In ArcMap when I’d do this, assuming my data schema’s were the same when I open a map or a layout my data dynamically updates. In fact, in ArcMap, if I do this and my data schema changes, it still works as long as any attributes driving symbology or labels remain the same. In experimenting in Pro, if the data schema changes at all, even if the attributes driving symbology and or labels remain exactly the same, all of my data disappears from my layouts and maps. I need to re-add it to the layout/map and re-symbolize and re-label.

In short, ArcMap was “more forgiving” if attributes changed. I can swap data sources in Pro if they are literally identical in attributes/schema but if I want to add new attributes to a data update (which is common in my workflows), the data disappears.

Is there a better way to swap data sources than renaming one to _OLD and naming the updated data the same as the old? I think PRO is technically working, but like I say, it seems to be less forgiving in this particular behavior. I need Pro to behave like ArcMap in this respect. I update data regularly, but frequently require that the data have some different attributes – in other words the table structure will vary.

I’m hoping maybe the way I’m trying to update can be improved so I don’t run into this?

Thanks Kory,

Sean

Sean,

1. In ArcMap when you have a map with a layer pointing to featureclass, and you rename featureclass in ArcCatalog to featureclass_OLD, what happens to the layer?  What data does the layer now point to?

2. Doing the same thing in Pro, you have a layer pointing to featureclass, and you rename featureclass in Catalog View to featureclass_OLD, what happens to the layer?  What data does the layer now point to?

In ArcMap I rename the old layer to _OLD and the new layer to the same name as the old layer. In that situation the data automatically points to the new data on the map. For example if my new feature class has an additional point, line or polygon compared to the old feature class those new elements are reflected on the map. This works perfectly in ArcMap even if the new feature class has additional attributes that were not in the old feature class. I’d do this data update in ArcCatalog with my maps pointing to the data source closed. When I re-open the maps, the new data is represented because ArcMap is still pointing to the “same” data source, even though I’ve actually changed it. It’s just named identically and the attributes ArcMap is looking for in order to symbolize and label the data are the same as before.

Additionally, in ArcMap if I had forgotten to change the name of the old feature class it would prompt me with a question mark in the TOC. In ArcMap I could update the data source in the map and assuming the new source had the same attributes for symbology and labels, the feature class would update in my map with all symbology and labels the same as before I had changed the source to the updated data.

In Pro this only works when the new feature class has an identical schema as the old. (I cannot add new attributes). I also cannot “update” the source and have the symbology and labeling properties retained. I am forced to re-assign symbology and labeling if my source data changes (Again even if the driving attributes for symbology and labeling haven’t changed). My guess is this is because Catalog and layouts and maps are all “connected” and even if those maps and layouts are not open/active the data driving them is “live” is a sense…..

Is there a way to “freeze” the maps and layouts so I can change/update my data sources without affecting them? Then, “thaw/unfreeze” them once I’ve changed updated?

I want to be able to close a map or a layout and update a feature class that is symbolized and labeled in the map/layout and when I re-open the map or layout have the new data source represented without having to re-assign my symbology or labels. Right now I can do this I Pro – but only when the feature class attributes are identical. In ArcMap/Catalog I’d do the same thing and add a new attribute to the data and it would still display everything the way I’d set it up before.

I don’t want to have to re-assign symbology and labeling each time I update if the source data contains new attributes that don’t impact the rules for symbology and labeling.

Hope that helps explain what is happening.

Sean

Sean - I have also noticed that when you want to Set Data Source in the properties for each layer you are only offered the features classes that match the geometry and not the entire database feature classes. I had to re-add my data to the map and then do the same as you...re-symbolize and then re-label.

I'd love to see a solution to this!

Sarah

Thanks Sarah,

Its been about 6 months since I first posted this. One "solution" or maybe its a "work-around" I've learned is to close all layouts and maps before making database changes.  This normally maintains my data symbology connection - but it's still not 100% which leads me to believe there is something broken in PRO somewhere related to this.  I can't reliable re-create the issue though so I'm just hoping a software updates addresses it in the future. In the mean-time I save a lot of lyrx files!

It think part of the issue is the fact that in PRO you can't choose when to save changes to a project. If you make a change in a map for example, that change is "live". You don't have to choose "Save" to "lock-in" your decision to actually apply those changes you've made.

There are probably great reasons why ESRI does it this way but as a guy that makes almost all paper maps, I preferred the way it worked in ArcMap where you could open an .mxd, make changes, even do analysis, and then close without saving and the next time you opened the .mxd, none of your work was saved.  If you wanted it saved, you had to explicitly save, or "Save-As" and choose a new name. 

I may post a suggestion to that effect.   

Ok.  I have a similar question.  This is the closest match I have been able to come up with.  I am looking for the same functionality that was in ArcCatalog where you could just right-click on an MXD and "set data source(s)".  So far I find it annoying to set data source from within each layer's properties one at a time.

This was similar to my concern that when I run Feature Class to Feature Class to overwrite a FC with a newer one, map layers that use that FC as a source are removed from maps, along with the symbology and labelling.  There is a setting for this in ArcGIS Pro options, Geoprocessing, "Remove layers that reference data overwritten by geoprocessing tools".

Geoprocessing options—ArcGIS Pro | ArcGIS Desktop 

"This option controls whether layers in a map will be removed if their source datasets are deleted by a geoprocessing tool that overwrites output. When it is checked (the default is checked), layers with a data source that is overwritten will be removed and a new layer that references the new dataset will be added to the map. When it is not checked, layers will remain as-is in the map, unless the data type or shape type (point, line, or polygon) of the data changes."

In my testing, it does not add a new layer to the map (when checked).  However, when it is not checked, the layer does remain in the map, which is what I wanted. 

I'm using ArcGIS Pro 2.4.1.  I'm not sure when this option was added.

I think that one is actually Need Ability to Replace Data Source for Multiple Layers‌ (In Product Plan)

Hi Sean Hlousek‌  It's been a while.  I hope you are well.

We were taking another look at this recently and it seems that ultimately what you have described as what you need to accomplish should work fine in ArcGIS Pro.  

I did some testing Friday and this morning, and I agree that if you are trying to do this type of swapping by changing data source names in the same project where your maps and layouts exist, it can become problematic.  You are correct that the project does keep everything connected, so if you have layers pointing to the data source you're renaming, the application will automatically update those.  Note that this is also how ArcMap works - if you do the renaming in the Catalog window of ArcMap, the layer is updated. 

So, to make this work in ArcMap, you close the mxd and do the renaming in ArcCatalog.  The strategy needs to be the same in Pro.  Close the project containing the maps and layouts, open a new instance of ArcGIS Pro and do the name swapping.  When you open the project with the maps/layouts, they should still be pointing to the same named datasets; i.e. the udpated data.  Since the project wasn't open to try to automatically update, this should allow you to do what you need to do.  

In the testing that I've done, I didn't experience any issues with symbology and I also tested with different schemas and didn't see any issues.

Can you take a look at your workflow again and provide any further details around issues that aren't working for you today?

Thank you!