Skip to content

Catalog

laktory.models.resources.databricks.Catalog ¤

Bases: BaseModel, PulumiResource, TerraformResource

A catalog is the first layer of Unity Catalog’s three-level namespace. It’s used to organize your data assets.

ATTRIBUTE DESCRIPTION
comment

Text description of the catalog

TYPE: Union[str, None]

force_destroy

If True catalog can be deleted, even when not empty

TYPE: bool

grants

List of grants operating on the catalog

TYPE: list[CatalogGrant]

isolation_mode

Whether the catalog is accessible from all workspaces or a specific set of workspaces. Can be ISOLATED or OPEN. Setting the catalog to ISOLATED will automatically allow access from the current workspace.

TYPE: Union[Literal['OPEN', 'ISOLATED'], str]

lookup_existing

Specifications for looking up existing resource. Other attributes will be ignored.

TYPE: CatalogLookup

name

Name of the catalog

TYPE: str

owner

User/group/service principal name of the catalog owner

TYPE: str

schemas

List of schemas stored in the catalog

TYPE: list[Schema]

storage_root

Managed location of the catalog. Location in cloud storage where data for managed tables will be stored. If not specified, the location will default to the metastore root location.

TYPE: str

Examples:

from laktory import models

catalog = models.resources.databricks.Catalog(
    name="dev",
    grants=[
        {"principal": "account users", "privileges": ["USE_CATALOG", "USE_SCHEMA"]}
    ],
    schemas=[
        {
            "name": "engineering",
            "grants": [{"principal": "domain-engineering", "privileges": ["SELECT"]}],
        },
        {
            "name": "sources",
            "volumes": [
                {
                    "name": "landing",
                    "volume_type": "EXTERNAL",
                    "grants": [
                        {
                            "principal": "account users",
                            "privileges": ["READ_VOLUME"],
                        },
                        {
                            "principal": "role-metastore-admins",
                            "privileges": ["WRITE_VOLUME"],
                        },
                    ],
                },
            ],
        },
    ],
)
References

Attributes¤

full_name property ¤

full_name

Full name of the catalog {catalog_name}

additional_core_resources property ¤

additional_core_resources
  • catalog grants
  • schemas resources

--

laktory.models.resources.databricks.catalog.CatalogLookup ¤

Bases: ResourceLookup

ATTRIBUTE DESCRIPTION
name

Catalog name

TYPE: str