Skip to content

Metastore

laktory.models.resources.databricks.Metastore ¤

Bases: MetastoreBase

Databricks Metastore

Examples:

import io

from laktory import models

metastore_yaml = '''
name: prod
region: eastus
grants:
- principal: account users
  privileges:
  - CREATE_CATALOG
workspace_assignments:
- workspace_id: 1234567890
  default_catalog_name: dev
'''
metastore = models.resources.databricks.Metastore.model_validate_yaml(
    io.StringIO(metastore_yaml)
)
References
BASE DESCRIPTION
api

Specifies whether to use account-level or workspace-level API. Valid values are account and workspace. When not set, the API level is inferred from the provider host.

TYPE: str | None | VariableType DEFAULT: None

default_data_access_config_id

Unique identifier of the metastore's (Default) Data Access Configuration.

TYPE: str | None | VariableType DEFAULT: None

delta_sharing_organization_name

The organization name of a Delta Sharing entity, to be used in Databricks-to-Databricks Delta Sharing as the official name.

TYPE: str | None | VariableType DEFAULT: None

delta_sharing_recipient_token_lifetime_in_seconds

The lifetime of delta sharing recipient token in seconds.

TYPE: int | None | VariableType DEFAULT: None

delta_sharing_scope

The scope of Delta Sharing enabled for the metastore.

TYPE: str | None | VariableType DEFAULT: None

external_access_enabled

Whether to allow non-DBR clients to directly access entities under the metastore.

TYPE: bool | None | VariableType DEFAULT: None

force_destroy

TYPE: bool | None | VariableType DEFAULT: None

name

The user-specified name of the metastore.

TYPE: str | None | VariableType DEFAULT: None

owner

The owner of the metastore.

TYPE: str | None | VariableType DEFAULT: None

privilege_model_version

Privilege model version of the metastore, of the form major.minor (e.g., 1.0).

TYPE: str | None | VariableType DEFAULT: None

region

Cloud region which the metastore serves (e.g., us-west-2, westus).

TYPE: str | None | VariableType DEFAULT: None

storage_root

The storage root URL for metastore

TYPE: str | None | VariableType DEFAULT: None

storage_root_credential_id

UUID of storage credential to access the metastore storage_root.

TYPE: str | None | VariableType DEFAULT: None

storage_root_credential_name

Name of the storage credential to access the metastore storage_root.

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: MetastoreGrant | list[MetastoreGrant] | VariableType DEFAULT: None

grants

Authoritative grant list for all principals. Replaces every existing grant on this Metastore - 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[MetastoreGrant | VariableType] | VariableType DEFAULT: None

grants_provider

Provider used for deploying grants

TYPE: str | VariableType DEFAULT: None

workspace_assignments

List of workspace to which metastore is assigned to

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

ATTRIBUTE DESCRIPTION
additional_core_resources
  • workspace assignments

TYPE: list

resource_key

Resource key used to build default resource name. Equivalent to

TYPE: str

additional_core_resources property ¤

  • workspace assignments
  • grants

resource_key property ¤

Resource key used to build default resource name. Equivalent to name properties if available. Otherwise, empty string.


laktory.models.resources.databricks.metastore.MetastoreLookup ¤

Bases: ResourceLookup

PARAMETER DESCRIPTION
metastore_id

ID of the metastore

TYPE: str | VariableType