Layers and stand-alone tables display information stored in a particular data source. If that data source is moved or renamed, the connection to the layer or table is broken and there is no data to display. To fix this, update the data source by performing any of the following actions:
- To fix broken links identified on a map by the broken data source button , click the button and browse to the data source.
- To change the data source of a layer or a stand-alone table, open its Properties dialog box. On the Source tab, click Set Data Source and browse to the data source.
- To automate the updating of data sources with Python, see Updating and fixing data sources.
- To manage all the data sources referenced by maps in the current project, access them from a Catalog view. You can update the paths in one item, like a single map in the project, or access all the paths across the whole project. You can find and replace specific strings within the paths. To update paths in the current project, follow the steps referenced below.
Caution:
There are some limitations to updating data source paths from a Catalog view. The following layer types and workspaces are not supported using this method:
- Stream layers
- Layers from in-memory workspaces
- Network analysis layers
- Map service layers
- Route event layers
- Web feature layers
- Query layers. You can change the data sources of a query layer while in the Workspace mode . If you update them from the Item mode , the query layer's source is replaced by a standard feature class.
Update data sources for project items
To update the data sources of all layers and stand-alone tables in the current project simultaneously, follow these steps:
- Switch to a Catalog view. Or, to open one, on the View tab, in the Windows group, click Catalog View .
- On the Catalog tab on the ribbon, in the Update group, click Data Sources to open the Update Data Sources mode of the Catalog view. The layers and stand-alone tables referenced in the entire current project are listed along with the path to their data source. Or you can filter this list to show the contents of one map only by selecting the map in the Contents pane of the Catalog view.
- Choose whether to view the data source paths of the project items or a list of all unique workspaces referenced by the project. Under Manage, on the Data Sources tab, in the View group, choose from the following:
Item View the data source paths of the project items.
Workspace View a list of all unique workspaces referenced by the project.
- In the New Path column, type or paste a new file path for any item listed. You can right-click any path in the Current Path column and click Copy, or click the Browse button to browse to a new path for any item that is listed.
Hover over any path in the table to see the data type, workspace type, and workspace path of the item. In the case of an enterprise geodatabase item, all of the server information is included as well.
- Choose whether to validate the target sources before applying changes. These changes persist throughout the current application session. Save the project to apply them permanently. Under Manage, on the Data Sources tab, in the Manage Changes group, choose one of the following options:
- Click the small arrow at the bottom of Apply and click Validate and Apply to validate the changes first and then apply them.
- Click Apply to apply changes without any validation.
- Under Manage, on the Data Sources tab, click Close to close the Update Data Sources mode of the Catalog view.
Find and replace portions of a path
If a folder location of a data source has been renamed or restructured, you can find and replace portions of data source paths in the current project to repair the connection. For example, if a folder named MonthlyData has been renamed as AnnualData, you can find all instances of the first string in all the data source paths and replace them with the second string.
To find and replace portions of a data source path, follow these steps:
- Switch to a Catalog view. Or, to open one, on the View tab, in the Windows group, click Catalog View .
- On the Catalog tab, in the Update group, click Data Sources to open the Update Data Sources mode of the Catalog view.
All the layers and stand-alone tables in the project are listed along with the path to their data source.
- Under Manage, on the Data Sources tab, in the Tools group, click Find and Replace .
- Type a string in the Find text box. Optionally, select items to limit the replacement to those items only. If no items are selected, the replacement is made to all items.
- Type a replacement string in the Replace text box. Click the Replace button to replace the string one item at a time, or click the Replace All button to replace all instances simultaneously.
- Choose whether to validate the target sources before applying changes. These changes persist throughout the current application session. Save the project to apply them permanently. Under Manage, on the Data Sources tab, in the Manage Changes group, choose one of the following options:
- Click the small arrow at the bottom of Apply and click Validate and Apply to validate the changes first and then apply them.
- Click Apply to apply changes without any validation.
- Click the Close Find and Replace button to close the Find and Replace controls.
- Under Manage, on the Data Sources tab, click Close to close the Update Data Sources mode of the Catalog view.
Validate changes
When updating data sources, you can choose to apply the changes as is, or you can validate the target source first and then apply. If you close the Data Sources panel without applying, a warning prompts you to apply. In this case, no validation takes place.
An example of a scenario in which you might want to apply without validation is if you are working in a staging folder location and preparing to move data to a final folder location that does not yet exist. These changes persist throughout the current application session. Save the project to apply them permanently.
When you make a change to a data source, a green vertical bar next to the item indicates that a change was made but has not yet been applied.
To apply changes without any validation of the target source, under Manage, on the Data Sources tab, in the Manage Changes group, click Apply . To validate the target source first and then apply changes, click the small arrow at the bottom of Apply and click Validate and Apply .
Once validation is successful, indicators are removed. In the event that the data source could not be found and validated, a red indicator is shown and a banner appears at the top of the panel to indicate that invalid items are present.