Data models

Swap data model connections (Beta)

Swap the connections used by a data model. 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 dataModelId by calling the /v2/dataModels endpoint.

  • Retrieve the connectionId by calling the /v2/connections endpoint.

  • To swap warehouse tables in a connection, set the swapTables option to true. Custom SQL elements and input tables follow the connection mapping whether or not swapTables is set.

    • Use the paths option 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 paths option empty to swap all warehouse tables in the connection. You can also pass a partial path to swap between databases, catalogs, or schemas.
  • Set copyInputTableData to true to copy input table rows onto the new connection. When omitted or false, input table connections are updated without copying row data.

post/v2/dataModels/{dataModelId}/swapConnections

Request

  • Base URL
    https://api.sigmacomputing.com
  • Auth
    HTTP bearer

Path parameters

dataModelIdstring required

Unique identifier of the data model.

Request body

copyInputTableDataboolean

When true, copy input table rows onto the swapped connection. When false or omitted, input table connections are updated without copying row data.

Response

The response body.

unswappedSourcesstring[] required

IDs of sources in the workbook that were not swapped.

unswappedConnectionsstring[] required

IDs of custom SQL connections in the workbook that were not swapped.

Changes

No recorded changes to this operation across all 1 revision of this API.