Swap template data sources
Swap the data sources used by a workbook template. You can swap from one connection to another, and/or from one dataset to another.
Usage notes
-
Retrieve the templateId by calling the /v2/templates endpoint.
-
Retrieve the connectionId to use as the toId by calling the /v2/connections endpoint.
-
To map the sources of a specific element, you can use the table or dataset ID:
- Retrieve the fromId for a specific data element by calling the /v2/workbooks/{workbookId}/lineage/elements/{elementId} endpoint and using the
sourcekey from the response, which looks likeinode-2PBoXx3UabchxF1F3l07kE. The ID is everything afterinode-. - Retrieve table and dataset IDs by calling the /v2/files endpoint. Use the
typeFiltersoption to filter for table and dataset files. Useidfield in the response as thefromIdortoId, as relevant.
- Retrieve the fromId for a specific data element by calling the /v2/workbooks/{workbookId}/lineage/elements/{elementId} endpoint and using the
Authentication
AuthorizationBearer
OAuth authentication of the form <token>.
Path parameters
templateId
Template ID
Request
The request body.
sourceMapping
connectionMapping
copyInputTableData
Response
The response body.
unswappedSources
IDs of sources in the workbook that were not swapped.
unswappedConnections
IDs of custom SQL connections in the workbook that were not swapped.

