Replace Data Sources

Note: Replacing a data source isn’t supported by Tableau Cloud or Tableau Server.

Users can update a workbook or sheet with a different data source. Replacing a data source doesn’t merge or edit the data sources. It redirects fields used in the worksheet to map to corresponding fields in the new data source. Any fields that the user creates in the original data source are copied over to the new data source. Fields that aren’t included in the original data source must be manually copied and pasted to the new data source before replacing the old one. When you replace a data source, the folder structures aren't copied over.

The two data sources don’t have to be identical, any differences between the data sources will affect the sheets in the workbook and the fields in the view. Any fields, groups, sets, and calculated fields that don’t exist in the new data source (or have a different name) are removed from the Data pane. For more information about how to replace field references to fix invalid fields, see Edit Data Sources.

Replace a Data Source

Complete the following steps to replace a data source.

  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 isn’t 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. (optional) Under the Current field, select the checkbox to replace the current worksheet only.

  7. When finished, select 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.

Note: 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.

Replace the Data Source for a Single Sheet

All sheets that use the data source will be updated when a data source is replaced. If you wish to replace the data source for a single sheet, you’ll need to use the following workaround.

  1. Copy the sheet to a new workbook.
  2. Delete the sheet from the old workbook.
  3. In the new workbook, replace the data source.
  4. Copy the sheet back into the original workbook. The data source and all relevant items for the sheet, such as parameters and sets will be copied as well. For more information, see Copy and paste sheets between workbooks.

Published Data Sources

When users publish a data source from a workbook, the current workbook in Tableau Desktop will automatically connect to the published data source and close the local data source. For more information on publishing a data source see Publish a Data Source.

Thanks for your feedback!Your feedback has been successfully submitted. Thank you!