Skip to content

Volume

laktory.models.resources.databricks.Volume ¤

Bases: BaseModel, PulumiResource, TerraformResource

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.

ATTRIBUTE DESCRIPTION
name

Name of the volume

TYPE: str

catalog_name

Name of the catalog storing the volume

TYPE: str

schema_name

Name of the schema storing the volume

TYPE: str

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']

storage_location

Path inside an External Location. Only used for EXTERNAL Volumes.

TYPE: str

grants

List of grants operating on the volume

TYPE: list[VolumeGrant]

Examples:

from laktory import models

volume = models.resources.databricks.Volume(
    name="landing",
    catalog_name="dev",
    schema_name="sources",
    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"]},
    ],
)
print(volume.full_name)
#> dev.sources.landing
print(volume.parent_full_name)
#> dev.sources
References

Attributes¤

parent_full_name property ¤

parent_full_name

Schema full name {catalog_name}.{schema_name}

full_name property ¤

full_name

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

resource_key property ¤

resource_key

Table full name (catalog.schema.volume)

additional_core_resources property ¤

additional_core_resources
  • volume grants