PostgresSyncedTable
laktory.models.resources.databricks.PostgresSyncedTable
¤
Bases: PostgresSyncedTableBase
Lakebase Autoscaling (Postgres) synced table
Copy of a Unity Catalog Delta table into a Postgres table for low-latency
serving, maintained by a managed Lakeflow pipeline. SNAPSHOT scheduling
copies the full table on each sync; TRIGGERED and CONTINUOUS are
incremental and require Change Data Feed on the source table. The source
table must exist when the synced table is created. Can also be declared in
the synced_tables of a PostgresBranch, which sets spec.branch.
Examples:
import io
from laktory import models
synced_table_yaml = '''
synced_table_id: app_pg.public.dim_customers
spec:
branch: projects/app/branches/production
postgres_database: app_db
source_table_full_name: prod.gold.dim_customers
primary_key_columns:
- customer_id
scheduling_policy: TRIGGERED
create_database_objects_if_missing: true
new_pipeline_spec:
storage_catalog: prod
storage_schema: lakebase
'''
synced_table = models.resources.databricks.PostgresSyncedTable.model_validate_yaml(
io.StringIO(synced_table_yaml)
)
| BASE | DESCRIPTION |
|---|---|
provider_config
|
Configure the provider for management through account provider
TYPE:
|
spec
|
Synced table configuration: source table, Postgres database, branch (set automatically when declared in the synced tables of a branch) and scheduling
TYPE:
|
synced_table_id
|
The part of the name, chosen by the user when the resource was created
TYPE:
|
laktory.models.resources.databricks.postgressyncedtable.PostgresSyncedTableProviderConfig
¤
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.postgressyncedtable.PostgresSyncedTableSpec
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
accelerated_sync
|
When true, enables accelerated sync mode for the initial data load. This significantly improves performance for large tables. Requires workspace-level enablement through Lakebase Accelerated Sync preview
TYPE:
|
branch
|
The full resource name the branch associated with the table
TYPE:
|
create_database_objects_if_missing
|
If true, the synced table's logical database and schema resources in PG will be created if they do not already exist. The request will fail if this is false and the database/schema do not exist
TYPE:
|
existing_pipeline_id
|
ID of an existing pipeline to bin-pack this synced table into. At most one of existing_pipeline_id and new_pipeline_spec should be defined
TYPE:
|
extra_columns
|
Extra PostgreSQL-only columns to add to the synced table
TYPE:
|
new_pipeline_spec
|
Specification for creating a new pipeline. At most one of existing_pipeline_id and new_pipeline_spec should be defined
TYPE:
|
postgres_database
|
The Postgres database name where the synced table will be created in
TYPE:
|
primary_key_columns
|
Primary Key columns to be used for data insert/update in the destination
TYPE:
|
scheduling_policy
|
Scheduling policy of the underlying pipeline. Possible values are:
TYPE:
|
source_table_full_name
|
Three-part (catalog, schema, table) name of the source Delta table
TYPE:
|
timeseries_key
|
Time series key to deduplicate (tie-break) rows with the same primary key
TYPE:
|
type_overrides
|
Override the default Delta->PG type mapping for specific columns. A TypeOverride with PG_SPECIFIC_TYPE_UNSPECIFIED is rejected; a valid pg_type must be set
TYPE:
|
laktory.models.resources.databricks.postgressyncedtable.PostgresSyncedTableSpecExtraColumns
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
column_name
|
Name of the source column whose target PostgreSQL type should be overridden
TYPE:
|
column_type
|
PostgreSQL type of the column, for example 'tsvector' or 'vector(1024)'
TYPE:
|
compute
|
SQL expression used to compute the column's value, for example 'to_tsvector('english', content)'
TYPE:
|
maintenance
|
Possible values are:
TYPE:
|
laktory.models.resources.databricks.postgressyncedtable.PostgresSyncedTableSpecNewPipelineSpec
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
budget_policy_id
|
Budget policy to set on the newly created pipeline
TYPE:
|
pipeline_channel
|
Release channel of the underlying pipeline's runtime. Some source table configurations (e.g., read-time CDF) require PREVIEW. Defaults to CURRENT if not specified. Possible values are:
TYPE:
|
storage_catalog
|
UC catalog for the pipeline to store intermediate files (checkpoints, event logs etc). This needs to be a standard catalog where the user has permissions to create Delta tables
TYPE:
|
storage_schema
|
UC schema for the pipeline to store intermediate files (checkpoints, event logs etc). This needs to be in the standard catalog where the user has permissions to create Delta tables
TYPE:
|
laktory.models.resources.databricks.postgressyncedtable.PostgresSyncedTableSpecTypeOverrides
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
column_name
|
Name of the source column whose target PostgreSQL type should be overridden
TYPE:
|
pg_type
|
PostgreSQL-specific target type to use for the column. Possible values are:
TYPE:
|
size
|
Size parameter for the target type, for types that take one (e.g. vector dimension, varchar length). Required when the chosen pg_type needs a size
TYPE:
|