model_versions
Creates, updates, deletes, gets or lists a model_versions
resource.
Overview
Name | model_versions |
Type | Resource |
Id | databricks_workspace.unitycatalog.model_versions |
Fields
The following fields are returned by SELECT
queries:
- list
- getbyalias
- get
The model version list was successfully retrieved
Name | Datatype | Description |
---|---|---|
id | string | |
metastore_id | string | |
run_id | string | |
run_workspace_id | string | |
catalog_name | string | |
model_name | string | |
schema_name | string | |
comment | string | |
created_at | integer | |
created_by | string | |
source | string | |
status | string | |
storage_location | string | |
updated_at | integer | |
updated_by | string | |
version | integer |
Successfully retrieved the properties of the model version
Name | Datatype | Description |
---|---|---|
id | string | |
metastore_id | string | |
run_id | string | |
run_workspace_id | string | |
catalog_name | string | |
model_name | string | |
schema_name | string | |
aliases | array | |
comment | string | |
created_at | integer | |
created_by | string | |
source | string | |
status | string | |
storage_location | string | |
updated_at | integer | |
updated_by | string | |
version | integer |
Successfully retrieved the properties of the model version
Name | Datatype | Description |
---|---|---|
id | string | |
metastore_id | string | |
run_id | string | |
run_workspace_id | string | |
catalog_name | string | |
model_name | string | |
schema_name | string | |
comment | string | |
created_at | integer | |
created_by | string | |
source | string | |
status | string | |
storage_location | string | |
updated_at | integer | |
updated_by | string | |
version | integer |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list | select | deployment_name | List model versions. You can list model versions under a particular schema, or list all model versions in the current metastore. | |
getbyalias | select | deployment_name | Get a model version by alias. | |
get | select | deployment_name | Get a model version. | |
update | update | deployment_name | Updates the specified model version. | |
delete | delete | deployment_name | Deletes a model version from the specified registered model. Any aliases assigned to the model version will also be deleted. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
SELECT
examples
- list
- getbyalias
- get
List model versions. You can list model versions under a particular schema, or list all model versions in the current metastore.
SELECT
id,
metastore_id,
run_id,
run_workspace_id,
catalog_name,
model_name,
schema_name,
comment,
created_at,
created_by,
source,
status,
storage_location,
updated_at,
updated_by,
version
FROM databricks_workspace.unitycatalog.model_versions
WHERE deployment_name = '{{ deployment_name }}' -- required;
Get a model version by alias.
SELECT
id,
metastore_id,
run_id,
run_workspace_id,
catalog_name,
model_name,
schema_name,
aliases,
comment,
created_at,
created_by,
source,
status,
storage_location,
updated_at,
updated_by,
version
FROM databricks_workspace.unitycatalog.model_versions
WHERE deployment_name = '{{ deployment_name }}' -- required;
Get a model version.
SELECT
id,
metastore_id,
run_id,
run_workspace_id,
catalog_name,
model_name,
schema_name,
comment,
created_at,
created_by,
source,
status,
storage_location,
updated_at,
updated_by,
version
FROM databricks_workspace.unitycatalog.model_versions
WHERE deployment_name = '{{ deployment_name }}' -- required;
UPDATE
examples
- update
Updates the specified model version.
UPDATE databricks_workspace.unitycatalog.model_versions
SET
data__comment = '{{ comment }}'
WHERE
deployment_name = '{{ deployment_name }}' --required
RETURNING
id,
metastore_id,
run_id,
run_workspace_id,
catalog_name,
model_name,
schema_name,
comment,
created_at,
created_by,
source,
status,
storage_location,
updated_at,
updated_by,
version;
DELETE
examples
- delete
Deletes a model version from the specified registered model. Any aliases assigned to the model version will also be deleted.
DELETE FROM databricks_workspace.unitycatalog.model_versions
WHERE deployment_name = '{{ deployment_name }}' --required;