Change the data source for a workbook or element
You can change the data source used by an entire workbook or data model, or change the data source used by a specific data element.
For example, you might build a workbook with data sources from a test data connection to reduce load on a production database while you experiment and create calculations. When you're ready to publish and share the workbook with your team or organization, you can replace the test data sources used by the workbook with production data sources.
You can also change or swap the data source of a workbook or data model automatically, based on the version tag. See Swap the source of a tagged version.
Requirements
- You must be granted Can use access to the connection that you want to change to.
- You must have Can edit or Can explore access to the document.
- If you want to change the source of an input table, the connection you change it to must have Write access enabled.
Considerations
- When swapping the source of a data model, consider the potential to create breaking changes in documents that use that data model as a source. For example, swapping the source of a table in a data model might change the available columns, column names, or data types, causing errors in downstream columns. For more information on preventing breaking changes when updating a data model, see Map changed columns in a data model.
Swap the data source for a workbook or data model
You can swap the data source for all elements in a workbook or data model, for example to change from a test data warehouse connection to a production data warehouse connection, do the following:
-
Open the document in Edit or Explore mode.
-
From the document menu
, select Swap data sources….
-
In the Swap Data Sources Overview modal, review the auto-selected Matching Connection. If needed, update the selected connection.
-
Review the Matching Data Sources for each element in the document. If any data sources have No Match, select Match Manually to choose a different data source for each element without a matching data source.
-
On the manual match page, select a data source used by an element, then click Select Source.

-
Search for or browse to a new data source, then click Select.

-
Select the next data source that needs to be matched and repeat these steps.

-
After all data sources without matches have been matched to a new data source, select Swap.
-
-
If none of your data sources need to be manually matched, select Swap Now.
The document updates to use the new data source. Any elements without matching data sources display an error.
Some elements have additional considerations for source swapping:
- If your document contains custom SQL elements, the data source and connection for those elements is not swapped. Instead, you must create a new SQL element and write equivalent SQL against the new data connection.
- If your document contains a table created from a CSV upload, you cannot swap the source of the table.
- If your workbook contains input tables with their data entry permissions set to Only editable in published version, the contents of the input table are not copied to the new data source. For more information, see Data entry permissions and input table version tagging.
Change the data source for an element
You can also change the data source used for a specific element. For example, if you created a view in your Snowflake database and you want to update a Sigma table element to use the view instead of the base table from the Snowflake connection, you can swap the source.
You cannot change the data source for an element that uses Custom SQL to directly query the connected data warehouse. If you change the source for a SQL element, the element no longer uses SQL.
Swap the data source for an element
After selecting an element while customizing or editing, you can change the data source:
- From the canvas, select
More > Element source > Change source. Or, on the Properties tab of the editor panel, locate the name of the data source and select
> Change source.
- Search for or browse to a new data source for the element.
- [optional] Preview the data source to choose specific columns, then click Add.
- Select the data source to finish changing the data source.
The data element updates. If your element contains a calculated column that references a column that does not exist in the new data source, the calculated column displays "unknown column".
Replace the table used by a table element
If you want to replace the table used by a table or pivot table element with a different table, do the following:
- From the canvas, select
More > Element source > Replace table. Or, on the Properties tab of the editor panel, locate the name of the data source and select
> Replace table.
- Search for or browse to a new table for the element.
- Review the selected columns and optionally deselect the checkboxes next to any unwanted columns.
- Click Add.
The data element updates. If your table contains a calculated column that references a column that does not exist in the new table, the calculated column displays "unknown column".
Updated about 3 hours ago
