Skip to content

Volume

laktory.models.resources.databricks.Volume ¤

Bases: VolumeBase

Volumes are Unity Catalog objects representing a logical volume of storage in a cloud object storage location. Volumes provide capabilities for accessing, storing, governing, and organizing files. While tables provide governance over tabular datasets, volumes add governance over non-tabular datasets. You can use volumes to store and access files in any format, including structured, semi-structured, and unstructured data.

Examples:

import io

from laktory import models

volume_yaml = '''
name: landing
catalog_name: dev
schema_name: sources
comment: Landing zone for raw data
volume_type: EXTERNAL
storage_location: abfss://landing@lakehouse-storage.dfs.core.windows.net/
grants:
- principal: account users
  privileges:
  - READ_VOLUME
- principal: role-metastore-admins
  privileges:
  - WRITE_VOLUME
'''
volume = models.resources.databricks.Volume.model_validate_yaml(
    io.StringIO(volume_yaml)
)
print(volume.full_name)
# > dev.sources.landing
print(volume.parent_full_name)
# > dev.sources
References
BASE DESCRIPTION
catalog_name

Name of the catalog storing the volume

TYPE: str | VariableType DEFAULT: None

comment

The comment attached to the volume

TYPE: str | None | VariableType DEFAULT: None

name

The name of the volume

TYPE: str | VariableType

owner

The identifier of the user who owns the volume

TYPE: str | None | VariableType DEFAULT: None

schema_name

Name of the schema storing the volume

TYPE: str | VariableType DEFAULT: None

storage_location

The storage location on the cloud

TYPE: str | None | VariableType DEFAULT: None

volume_type

Type of volume. A managed volume is a Unity Catalog-governed storage volume created within the default storage location of the containing schema. An external volume is a Unity Catalog-governed storage volume registered against a directory within an external location.

TYPE: Literal['MANAGED', 'EXTERNAL'] | VariableType DEFAULT: 'MANAGED'

LAKTORY DESCRIPTION
grant

Grant(s) operating on the Volume and authoritative for a specific principal. Other principals within the grants are preserved. Mutually exclusive with grants.

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

grants

Grants operating on the Volume and authoritative for all principals. Replaces any existing grants defined inside or outside of Laktory. Mutually exclusive with grant.

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

ATTRIBUTE DESCRIPTION
additional_core_resources
  • volume grants

TYPE: list

full_name

Volume full name {catalog_name}.{schema_name}.{volume_name}

TYPE: str

parent_full_name

Schema full name {catalog_name}.{schema_name}

TYPE: str

resource_key

Table full name (catalog.schema.volume)

TYPE: str

additional_core_resources property ¤

  • volume grants

full_name property ¤

Volume full name {catalog_name}.{schema_name}.{volume_name}

parent_full_name property ¤

Schema full name {catalog_name}.{schema_name}

resource_key property ¤

Table full name (catalog.schema.volume)