Schemas

Package: databricks.bundles.schemas

Classes

class DependsOn
resource: str

Key of the resource to depend on, as foo or jobs.foo, or of its grants or permissions, as schemas.foo.grants.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class Lifecycle
depends_on: list[DependsOn]

Resources that must be deployed before this resource and deleted after it. Unlike variable references, this only affects ordering.

prevent_destroy: bool | None = None

Lifecycle setting to prevent the resource from being destroyed.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class Privilege
SELECT = 'SELECT'
READ_PRIVATE_FILES = 'READ_PRIVATE_FILES'
WRITE_PRIVATE_FILES = 'WRITE_PRIVATE_FILES'
CREATE = 'CREATE'
USAGE = 'USAGE'
USE_CATALOG = 'USE_CATALOG'
USE_SCHEMA = 'USE_SCHEMA'
CREATE_SCHEMA = 'CREATE_SCHEMA'
CREATE_VIEW = 'CREATE_VIEW'
CREATE_EXTERNAL_TABLE = 'CREATE_EXTERNAL_TABLE'
CREATE_MATERIALIZED_VIEW = 'CREATE_MATERIALIZED_VIEW'
CREATE_FUNCTION = 'CREATE_FUNCTION'
CREATE_MODEL = 'CREATE_MODEL'
CREATE_CATALOG = 'CREATE_CATALOG'
CREATE_MANAGED_STORAGE = 'CREATE_MANAGED_STORAGE'
CREATE_EXTERNAL_LOCATION = 'CREATE_EXTERNAL_LOCATION'
CREATE_STORAGE_CREDENTIAL = 'CREATE_STORAGE_CREDENTIAL'
CREATE_SERVICE_CREDENTIAL = 'CREATE_SERVICE_CREDENTIAL'
ACCESS = 'ACCESS'
CREATE_SHARE = 'CREATE_SHARE'
CREATE_RECIPIENT = 'CREATE_RECIPIENT'
CREATE_PROVIDER = 'CREATE_PROVIDER'
USE_SHARE = 'USE_SHARE'
USE_RECIPIENT = 'USE_RECIPIENT'
USE_PROVIDER = 'USE_PROVIDER'
USE_MARKETPLACE_ASSETS = 'USE_MARKETPLACE_ASSETS'
SET_SHARE_PERMISSION = 'SET_SHARE_PERMISSION'
MODIFY = 'MODIFY'
REFRESH = 'REFRESH'
EXECUTE = 'EXECUTE'
READ_FILES = 'READ_FILES'
WRITE_FILES = 'WRITE_FILES'
CREATE_TABLE = 'CREATE_TABLE'
ALL_PRIVILEGES = 'ALL_PRIVILEGES'
CREATE_CONNECTION = 'CREATE_CONNECTION'
USE_CONNECTION = 'USE_CONNECTION'
APPLY_TAG = 'APPLY_TAG'
CREATE_FOREIGN_CATALOG = 'CREATE_FOREIGN_CATALOG'
CREATE_FOREIGN_SECURABLE = 'CREATE_FOREIGN_SECURABLE'
MANAGE_ALLOWLIST = 'MANAGE_ALLOWLIST'
CREATE_VOLUME = 'CREATE_VOLUME'
CREATE_EXTERNAL_VOLUME = 'CREATE_EXTERNAL_VOLUME'
READ_VOLUME = 'READ_VOLUME'
WRITE_VOLUME = 'WRITE_VOLUME'
MANAGE = 'MANAGE'
BROWSE = 'BROWSE'
CREATE_CLEAN_ROOM = 'CREATE_CLEAN_ROOM'
MODIFY_CLEAN_ROOM = 'MODIFY_CLEAN_ROOM'
EXECUTE_CLEAN_ROOM_TASK = 'EXECUTE_CLEAN_ROOM_TASK'
EXTERNAL_USE_SCHEMA = 'EXTERNAL_USE_SCHEMA'
READ_METADATA = 'READ_METADATA'
CREATE_FEATURE = 'CREATE_FEATURE'
READ_FEATURE = 'READ_FEATURE'
EXTERNAL_USE_LOCATION = 'EXTERNAL_USE_LOCATION'
class PrivilegeAssignment
principal: str | None = None

The principal (user email address or group name).

privileges: list[Privilege]

The privileges assigned to the principal.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class Schema
catalog_name: str

Name of parent catalog.

name: str

Name of schema, relative to parent catalog.

comment: str | None = None

User-provided free-form text description.

custom_max_retention_hours: int | None = None

[Public Preview] Dropped objects in the schema remain recoverable for this number of hours before they are permanently purged. The value must be 0 or within the range allowed for the metastore. Schemas that do not set their own value inherit the parent catalog’s value.

grants: list[PrivilegeAssignment]

The Unity Catalog privileges to grant to principals on this securable.

lifecycle: Lifecycle | None = None

Settings that control the deployment lifecycle of the resource, such as preventing it from being destroyed.

properties: dict[str, str]

A map of key-value properties attached to the securable.

storage_root: str | None = None

Managed tables and volumes in the schema are stored under this storage root URL. The path must be inside an external location on which the caller has the CREATE MANAGED STORAGE privilege. If omitted, managed data is stored under the parent catalog’s storage root, or under the metastore’s root storage location when the catalog has none. Schemas in Delta Sharing catalogs cannot have a storage root, and schemas in a federated Hive metastore catalog must set one.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
SchemaGrant

alias of PrivilegeAssignment

SchemaGrantPrivilege

alias of Privilege