Update data sources

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 Repair Broken Data Source, 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, such as a single map in the project, or access all the paths in the project. You can find and replace specific strings in the paths. To update paths in the current project, follow the steps referenced below.
    Caution:

    There are 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 Workspace mode Geodatabase. If you update them from Item mode Legend Layers, the query layer's source is replaced by a standard feature class.
    Unsupported items are listed under a separate heading in the data sources tables in a catalog view.

Update data sources for project items

Follow these steps to simultaneously update the data sources of all layers and stand-alone tables in the current project from a catalog view:

  1. Switch to a catalog view. To open one, on the View tab, in the Windows group, click Catalog View Catalog View.
  2. On the Catalog tab on the ribbon, in the Update group, click Data Sources Data Sources to open the Update Data Sources mode of a catalog view. Alternatively, right-click the map name in the Contents pane of the map view or in the Catalog pane and click Update Data Sources to open a catalog view in this mode.
    The layers and stand-alone tables referenced in the current project are listed along with the paths to their data source. To filter this list to show the contents of one map, select the map in the Contents pane of a catalog view.
  3. Choose whether to view the data source paths of the project items or a list of all unique workspaces referenced by the project. On the ribbon, on the Data Sources tab, in the View group, choose from the following:
    Item Legend Layers

    View the data source paths of the project items.

    Workspace Geodatabase

    View a list of all unique workspaces referenced by the project.

  4. In the New Path column, type or paste a new file path for any item listed. Right-click a path in the Current Path column and click Copy, or click the Browse button Browse and browse to a new path for an item.

    Hover over a 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 also included.

  5. 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. On the Data Sources tab, in the Manage Changes group, do one of the following:
    • Click the small arrow at the bottom of Apply Apply and click Validate and Apply Apply to validate the changes before you apply them.
    • Click Apply Apply to apply changes without validation.
  6. On the Data Sources tab, click Close 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 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:

  1. Switch to a catalog view. To open one, on the View tab, in the Windows group, click Catalog View Catalog View.
  2. On the Catalog tab, in the Update group, click Data Sources 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 paths to their data source.

  3. On the Data Sources tab, in the Tools group, click Find and Replace Locate.
  4. Type a string in the Find text box. Optionally, select items to limit the replacement to those items only. If no items are selected, all items are replaced.
  5. Type a replacement string in the Replace text box, click the Replace button Replace to replace the string one item at a time, or click the Replace All button Replace All to replace all instances simultaneously.
  6. Choose whether to validate the target sources before applying changes. These changes persist throughout the current application session. Save the project to apply the changes permanently. On the Data Sources tab, in the Manage Changes group, do one of the following:
    • Click the small arrow at the bottom of Apply Apply and click Validate and Apply Apply to validate the changes before you apply them.
    • Click Apply Apply to apply changes without validation.
  7. Click the Close Find and Replace button Close to close the Find and Replace controls.
  8. On the Data Sources tab, click Close Close to close the Update Data Sources mode of the catalog view.

Validate changes

When updating data sources, you can apply the changes as is, or you can validate the target source before applying the change. If you close the Data Sources panel without applying the change, a warning prompts you to apply it. In this case, no validation occurs.

An example of a scenario in which you may want to apply a change 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 the changes 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.

Item with a green bar indicating that a data source change has not yet been applied

To apply changes without validating the target source, on the Data Sources tab, in the Manage Changes group, click Apply Apply. To validate the target source before applying changes, click the small arrow at the bottom of Apply Apply and click Validate and Apply Apply. Once validation is successful, the indicators are removed.

In the event the data source was not found and validated, a red indicator next to the item and a banner at the top of the panel appear, indicating that invalid items are present. In some cases, a data source may be considered invalid because the fields of the layer or table could not be successfully matched.

Item with a red bar indicating that a data source change cannot be validated

Related topics