Tag a data model
Add a version tag to a data model and optionally set up a connection to swap to for a specific version of the data model.
Usage notes
- Retrieve the dataModelId by calling the /v2/dataModels endpoint.
- Retrieve the tag by calling the /v2/tags endpoint and using the
namein the response. - Retrieve the connectionId to use as the fromId or toId by calling the /v2/connections endpoint.
- If your data model includes a source that is not mapped to a new source, that source is not swapped.
- When swapping data models used as the source for the data model:
- You can only swap a data model source to another version of the same data model source. You cannot swap a data model source to a table in your data warehouse or a dataset.
- When you swap sources from one data model version to a new one, specify the version tag of the data model that you swap to with
toVersionTagId:- To swap to the latest published version of the data model, specify
toVersionTagIdasnull. - To swap to a specific tagged version of the data model, specify the
toVersionTagIdof the data model.
- To swap to the latest published version of the data model, specify
- If the data model already uses a specific tagged version of a data model as a source, use
fromVersionTagIdto indicate which tagged version to swap from.- To swap from the latest published version of the data model, specify
fromVersionTagIdasnull. - To swap from a specific tagged version of the data model, specify the
fromVersionTagIdof the data model.
- To swap from the latest published version of the data model, specify
- To retrieve the
fromVersionTagIdfor a data model used as the data model source, call the /v2/dataModels/{dataModelId}/sources endpoint and use theversionTagIdin the response. - To retrieve the
versionTagIdfor a data model, call the /v2/dataModels endpoint and use theversionTagIdin the response.
Usage scenarios
- Lifecycle management: Identify production and development resources.
Authentication
AuthorizationBearer
OAuth authentication of the form <token>.
Request
The request body.
dataModelId
Unique identifier of the data model.
tag
Name of the version tag to apply.
dataModelVersion
Specific version of the published data model to tag.
sourceMappingConfig
Swap sources for the data model when you add a tag.
dataModelSourceTaggedVersions
Which tagged version of the data model to use as the source.
isDefault
Whether to make this tag the default tagged version to load if the user doesn't have access to the published version.
Response
The response body.
versionTagId
taggedDataModelId
Unique identifier of the data model.
taggedDataModelVersion

