Volume
laktory.models.resources.databricks.Volume
¤
Bases: UnityCatalogMixin, TagsMixin, AccessRequestDestinationsMixin, 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/
tags:
purpose: data_ingestion
files:
- source: ./data/stock_prices/prices.json
dirpath: stock_prices/
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
print(volume.path)
# > /Volumes/dev/sources/landing
References
| BASE | DESCRIPTION |
|---|---|
catalog_name
|
Name of the catalog storing the volume
TYPE:
|
comment
|
The comment attached to the volume
TYPE:
|
name
|
The name of the volume
TYPE:
|
owner
|
The identifier of the user who owns the volume
TYPE:
|
schema_name
|
Name of the schema storing the volume
TYPE:
|
storage_location
|
The storage location on the cloud
TYPE:
|
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:
|
| LAKTORY | DESCRIPTION |
|---|---|
access_request_destinations
|
Destinations (email, Slack, Microsoft Teams, webhook or the securable owner) notified when users request access to this securable. Deployed as an
TYPE:
|
files
|
Files uploaded to the volume. Their
TYPE:
|
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
TYPE:
|
grants
|
Authoritative grant list for all principals. Replaces every existing grant on this Volume - 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
TYPE:
|
tags
|
Tags assigned to the entity as
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
get_tags_additional_resources |
Tag assignment resources for |
| ATTRIBUTE | DESCRIPTION |
|---|---|
additional_core_resources |
TYPE:
|
full_name |
Full volume name
TYPE:
|
parent_full_name |
Parent namespace in the UC three-level hierarchy
TYPE:
|
path |
Volume path
TYPE:
|
additional_core_resources
property
¤
- volume grants
- volume tags
- volume access request destinations
- volume files
full_name
property
¤
Full volume name {catalog_name}.{schema_name}.{volume_name}
parent_full_name
property
¤
Parent namespace in the UC three-level hierarchy
path
property
¤
Volume path /Volumes/{catalog_name}/{schema_name}/{volume_name}
get_tags_additional_resources(entity_type, entity, tags=None)
¤
Tag assignment resources for entity (a name or a resource reference).
Defaults to the tags of this resource.
Source code in laktory/models/resources/databricks/_tagsmixin.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
laktory.models.resources.databricks.volume.VolumeLookup
¤
Bases: ResourceLookup
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Full name of the volume:
TYPE:
|