Skip to content

RegisteredModel

laktory.models.resources.databricks.RegisteredModel ¤

Bases: UnityCatalogMixin, RegisteredModelBase

Databricks Unity Catalog registered model

Examples:

import io

from laktory import models

registered_model_yaml = '''
name: my-model
catalog_name: main
schema_name: default
comment: "Registered model for my project"
grants:
- principal: account users
  privileges:
  - EXECUTE
'''
registered_model = models.resources.databricks.RegisteredModel.model_validate_yaml(
    io.StringIO(registered_model_yaml)
)
print(registered_model.full_name)
# > main.default.my-model
References
BASE DESCRIPTION
aliases

TYPE: list[RegisteredModelAliases] | None | VariableType DEFAULT: None

browse_only

TYPE: bool | None | VariableType DEFAULT: None

catalog_name

The name of the catalog where the schema and the registered model reside. Change of this parameter forces recreation of the resource.

TYPE: str | None | VariableType DEFAULT: None

comment

The comment attached to the registered model

TYPE: str | None | VariableType DEFAULT: None

created_at

TYPE: int | None | VariableType DEFAULT: None

created_by

TYPE: str | None | VariableType DEFAULT: None

metastore_id

TYPE: str | None | VariableType DEFAULT: None

name

The name of the registered model. Change of this parameter forces recreation of the resource.

TYPE: str | None | VariableType DEFAULT: None

owner

Name of the registered model owner

TYPE: str | None | VariableType DEFAULT: None

schema_name

The name of the schema where the registered model resides. Change of this parameter forces recreation of the resource.

TYPE: str | None | VariableType DEFAULT: None

storage_location

The storage location under which model version data files are stored. If the URL contains special characters, such as space, &, etc., they should be percent-encoded (space -> %20, etc.). Change of this parameter forces recreation of the resource.

TYPE: str | None | VariableType DEFAULT: None

updated_at

TYPE: int | None | VariableType DEFAULT: None

updated_by

TYPE: str | None | VariableType DEFAULT: None

LAKTORY DESCRIPTION
grant

Non-destructive grant for specific principal(s). Adds or updates privileges for the listed principal(s) and leaves grants for all other principals untouched. Use when access is managed from multiple sources (Laktory, Databricks UI, etc.). Mutually exclusive with grants.

TYPE: RegisteredModelGrant | list[RegisteredModelGrant] | VariableType DEFAULT: None

grants

Authoritative grant list for all principals. Replaces every existing grant on this Registered Model - including those set outside Laktory - with only the entries listed here. Use only when Laktory owns all access management for this resource. Mutually exclusive with grant.

TYPE: list[RegisteredModelGrant | VariableType] | VariableType DEFAULT: None

ATTRIBUTE DESCRIPTION
additional_core_resources
  • registered model grants

TYPE: list

full_name

Registered model full name {catalog_name}.{schema_name}.{model_name}

TYPE: str

parent_full_name

Parent namespace in the UC three-level hierarchy

TYPE: str | None

additional_core_resources property ¤

  • registered model grants

full_name property ¤

Registered model full name {catalog_name}.{schema_name}.{model_name}

parent_full_name property ¤

Parent namespace in the UC three-level hierarchy


laktory.models.resources.databricks.registeredmodel.RegisteredModelAliases ¤

Bases: BaseModel

PARAMETER DESCRIPTION
alias_name

TYPE: str | None | VariableType DEFAULT: None

catalog_name

The name of the catalog where the schema and the registered model reside. Change of this parameter forces recreation of the resource.

TYPE: str | None | VariableType DEFAULT: None

id

Equal to the full name of the model (catalog_name.schema_name.name) and used to identify the model uniquely across the metastore

TYPE: str | None | VariableType DEFAULT: None

model_name

TYPE: str | None | VariableType DEFAULT: None

schema_name

The name of the schema where the registered model resides. Change of this parameter forces recreation of the resource.

TYPE: str | None | VariableType DEFAULT: None

version_num

TYPE: int | None | VariableType DEFAULT: None


laktory.models.resources.databricks.registeredmodel.RegisteredModelLookup ¤

Bases: ResourceLookup

PARAMETER DESCRIPTION
name

Full name of the registered model: catalog.schema.model

TYPE: str | VariableType