Skip to main content

model_transition_requests

Operations on a model_transition_requests resource.

Overview

Namemodel_transition_requests
TypeResource
Iddatabricks_workspace.machinelearning.model_transition_requests

Fields

NameDatatype
idstring
activity_typestring
commentstring
creation_timestampinteger
from_stagestring
last_updated_timestampinteger
system_commentstring
to_stagestring
user_idstring

Methods

NameAccessible byRequired ParamsDescription
listtransitionrequestsSELECTname, version, deployment_nameGets a list of all open stage transition requests for the model version.
createtransitionrequestINSERTdeployment_nameCreates a model version stage transition request.
deletetransitionrequestDELETEcreator, name, stage, version, deployment_nameCancels a model version stage transition request.
approvetransitionrequestEXECdeployment_nameApproves a model version stage transition request.
rejecttransitionrequestEXECdeployment_nameRejects a model version stage transition request.
transitionstageEXECdeployment_nameTransition a model version's stage. This is a Databricks workspace version of the

SELECT examples

SELECT
id,
activity_type,
comment,
creation_timestamp,
from_stage,
last_updated_timestamp,
system_comment,
to_stage,
user_id
FROM databricks_workspace.machinelearning.model_transition_requests
WHERE name = '{{ name }}' AND
version = '{{ version }}' AND
deployment_name = '{{ deployment_name }}';

INSERT example

Use the following StackQL query and manifest file to create a new model_transition_requests resource.

/*+ create */
INSERT INTO databricks_workspace.machinelearning.model_transition_requests (
deployment_name,
data__name,
data__version,
data__stage,
data__comment
)
SELECT
'{{ deployment_name }}',
'{{ name }}',
'{{ version }}',
'{{ stage }}',
'{{ comment }}'
;

DELETE example

Deletes a model_transition_requests resource.

/*+ delete */
DELETE FROM databricks_workspace.machinelearning.model_transition_requests
WHERE creator = '{{ creator }}' AND
name = '{{ name }}' AND
stage = '{{ stage }}' AND
version = '{{ version }}' AND
deployment_name = '{{ deployment_name }}';