model_transition_requests
Operations on a model_transition_requests
resource.
Overview
Name | model_transition_requests |
Type | Resource |
Id | databricks_workspace.machinelearning.model_transition_requests |
Fields
Name | Datatype |
---|---|
id | string |
activity_type | string |
comment | string |
creation_timestamp | integer |
from_stage | string |
last_updated_timestamp | integer |
system_comment | string |
to_stage | string |
user_id | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
listtransitionrequests | SELECT | name, version, deployment_name | Gets a list of all open stage transition requests for the model version. |
createtransitionrequest | INSERT | deployment_name | Creates a model version stage transition request. |
deletetransitionrequest | DELETE | creator, name, stage, version, deployment_name | Cancels a model version stage transition request. |
approvetransitionrequest | EXEC | deployment_name | Approves a model version stage transition request. |
rejecttransitionrequest | EXEC | deployment_name | Rejects a model version stage transition request. |
transitionstage | EXEC | deployment_name | Transition 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.
- model_transition_requests
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: name
value: search_ads_model
- name: version
value: '1'
- name: stage
value: Staging
- name: comment
value: This version is great!
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 }}';