Schema
laktory.models.resources.databricks.Schema
¤
Bases: UnityCatalogMixin, SchemaBase
A schema (also called a database) is the second layer of Unity Catalog's three-level namespace. A schema organizes tables and views.
Examples:
import io
from laktory import models
schema_yaml = '''
catalog_name: dev
name: engineering
grants:
- principal: domain-engineering
privileges:
- SELECT
'''
schema = models.resources.databricks.Schema.model_validate_yaml(
io.StringIO(schema_yaml)
)
References
| BASE | DESCRIPTION |
|---|---|
catalog_name
|
Name of the catalog storing the schema
TYPE:
|
comment
|
User-provided free-form text description.
TYPE:
|
enable_predictive_optimization
|
Whether predictive optimization should be enabled for this object and objects under it.
TYPE:
|
force_destroy
|
If
TYPE:
|
metastore_id
|
Unique identifier of parent metastore.
TYPE:
|
name
|
Name of schema, relative to parent catalog.
TYPE:
|
owner
|
Username of current owner of schema.
TYPE:
|
properties
|
A map of key-value properties attached to the securable.
TYPE:
|
storage_root
|
Storage root URL for managed tables within schema.
TYPE:
|
| 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
TYPE:
|
grants
|
Authoritative grant list for all principals. Replaces every existing grant on this Schema — 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:
|
tables
|
List of tables stored in the schema
TYPE:
|
volumes
|
List of volumes stored in the schema
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
additional_core_resources |
TYPE:
|
full_name |
Full schema name
TYPE:
|
parent_full_name |
Parent namespace in the UC three-level hierarchy
TYPE:
|