Database Catalogs

Package: databricks.bundles.database_catalogs

Classes

class DatabaseCatalog

A Database Catalog registers a Postgres database that lives in a Lakebase database instance as a catalog in Unity Catalog, so that the database’s schemas and tables are governed and discoverable through Unity Catalog. For an overview, see https://docs.databricks.com/aws/en/oltp/projects/register-uc.

database_instance_name: str

[Public Preview] The name of the DatabaseInstance housing the database.

database_name: str

[Public Preview] The name of the Postgres database in the instance that the catalog registers. The database must already exist unless create_database_if_not_exists is true. The system databases postgres, databricks_system, template0 and template1 cannot be registered.

name: str

[Public Preview] The name of the catalog in Unity Catalog.

create_database_if_not_exists: bool | None = None

[Public Preview] If true, the database named in database_name is created in the instance when it does not already exist, with the calling user as its owner. Defaults to false.

lifecycle: Lifecycle | None = None

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

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
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