PostgresDatabase
laktory.models.resources.databricks.PostgresDatabase
¤
Bases: PostgresDatabaseBase
Lakebase Autoscaling (Postgres) Database
Postgres database of a branch, owned by a role of the same branch. A
databricks-postgres database is created implicitly with each branch:
set replace_existing: true to manage it. Removing a managed database
from the configuration deletes it. Can also be declared in the
databases of a PostgresBranch.
Examples:
import io
from laktory import models
database_yaml = '''
parent: projects/app/branches/production
database_id: app-db
spec:
postgres_database: app_db
role: projects/app/branches/production/roles/app-owner
data_api:
spec:
db_schemas:
- public
cdf_configs:
- postgres_schema: public
catalog: dev
schema: app_replicated
'''
database = models.resources.databricks.PostgresDatabase.model_validate_yaml(
io.StringIO(database_yaml)
)
| BASE | DESCRIPTION |
|---|---|
database_id
|
Part of the resource name
TYPE:
|
parent
|
Branch of the database (
TYPE:
|
provider_config
|
Configure the provider for management through account provider
TYPE:
|
replace_existing
|
If true, update the database if it already exists instead of returning an error
TYPE:
|
spec
|
The desired state of the Database
TYPE:
|
| LAKTORY | DESCRIPTION |
|---|---|
cdf_configs
|
Change data feed configurations replicating schemas of the database into Unity Catalog. Their
TYPE:
|
data_api
|
Data API exposing the database. Its
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
assign_parents |
Set the database path on nested resources |
| ATTRIBUTE | DESCRIPTION |
|---|---|
additional_core_resources |
TYPE:
|
path |
Lakebase resource path
TYPE:
|
additional_core_resources
property
¤
- data API
- change data feed configurations
path
property
¤
Lakebase resource path {branch path}/databases/{database_id}
assign_parents()
¤
Set the database path on nested resources
Source code in laktory/models/resources/databricks/postgresdatabase.py
72 73 74 75 76 77 78 79 80 | |
laktory.models.resources.databricks.postgresdatabase.PostgresDatabaseProviderConfig
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
workspace_id
|
Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with
TYPE:
|
laktory.models.resources.databricks.postgresdatabase.PostgresDatabaseSpec
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
postgres_database
|
The name of the Postgres database
TYPE:
|
role
|
The name of the role that owns the database. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
TYPE:
|