Swap workbook connections (Beta)
Swap the connections used by a workbook. You can update custom SQL elements to query a different connection, and optionally swap warehouse tables and copy input table data.
Beta: This documentation describes a public beta feature and is subject to the Beta features disclaimer.
Usage notes
-
Retrieve the workbookId by calling the /v2/workbooks endpoint.
-
Retrieve the connectionId by calling the /v2/connections endpoint.
-
To swap warehouse tables in a connection, set the
swapTablesoption totrue. Custom SQL elements and input tables follow the connection mapping whether or notswapTablesis set.- Use the
pathsoption to specify the connection paths to swap. The connection path is a list of strings that represents the path to the table in the cloud data warehouse. For example,["database", "schema", "table"]. - If the table schema is the same in both connections, leave the
pathsoption empty to swap all warehouse tables in the connection. You can also pass a partial path to swap between databases, catalogs, or schemas.
- Use the
-
Set
copyInputTableDatatotrueto copy input table rows onto the new connection. When omitted orfalse, input table connections are updated without copying row data.
Authentication
OAuth authentication of the form <token>.

