Replace Data Sources

There are times when you may want to update a workbook or sheet to use a different data source. Rather than rebuild your workbook using a new data source, you can replace the data source.

Note: When you publish a data source to Tableau Server or Tableau Online, the current workbook in Tableau Desktop will automatically connect to the published data source, and automatically close the local data source. So it is not necessary to replace the data source when you publish a data source. In addition, replacing a data source is not currently for web authoring in Tableau Online or Tableau Server.

You can only replace one data source with another data source when both data sources are relational data sources, or when both data sources are cube (multidimensional) data sources. In Tableau, cube data sources are supported for Windows only.

Replacing a data source does not merge or edit the data sources. Rather, replacing a data source simply redirects fields used in the worksheet to map to corresponding fields in the new data source. To successfully replace a data source, any fields in the original data source (for example, calculated fields, groups, sets, parameters, etc.), should also exist in the new data source. If not, then you may want to manually copy and paste these fields to the new data source before replacing the old one.

The two data sources do not have to be identical, however, any differences between the workbooks will affect the sheets in the workbook and the fields in the view. More specifically, any fields, groups, sets, and calculated fields that do not exist in the new data source (or have a different name) are removed from the Data pane. If any fields were used in a view, they will remain in the Data pane but marked as invalid. Additionally, you might see changes to custom sets, groups, and calculated fields that depend on the missing fields. For more information about how to replace field references to fix invalid fields, see Edit Data Sources.

 

  1. Open a workbook that connects to the original data source.

  2. Select Data > New Data Source and then connect to the new data source.

  3. On the Data Source page, drag a table to the canvas to set up the data source (if this is not automatically done for you).

  4. Go to the sheet tab and select Data > Replace Data Source.

    Note: You must have at least one field in the view to make the Replace Data Source option available.

  5. In the Replace Data Source dialog box, select the Current data source and the Replacement data source.

  6. When finished, click OK.

All worksheets, dashboards, and stories that used the original data source are updated to use the new data source. You can click Undo on the toolbar to revert the change and return to the original data source.

Thanks for your feedback! There was an error submitting your feedback. Try again or send us a message.