postgres_cdf_configs
Creates, updates, deletes, gets or lists a postgres_cdf_configs resource.
Overview
| Name | postgres_cdf_configs |
| Type | Resource |
| Id | databricks_workspace.postgres.postgres_cdf_configs |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The full resource name of the CdfConfig. Format: projects/{project}/branches/{branch}/databases/{database}/cdf-configs/{cdf_config} |
cdf_config_id | string | The user-specified id; equals the final segment of ``name``. Defaults to the Postgres schema name for configs without an explicit id. |
catalog | string | The Unity Catalog catalog that replicated tables are written into. Set at creation; the CdfConfig is immutable. |
create_time | string (date-time) | When the CdfConfig was created. |
postgres_schema | string | The Postgres schema this CdfConfig replicates from. Unique within the parent database. Set at creation; the CdfConfig is immutable. |
schema | string | The Unity Catalog schema that replicated tables are written into. Set at creation; the CdfConfig is immutable. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | parent, deployment_name | page_size, page_token | List all CDF configurations for a Lakebase database. Each configuration maps a Postgres schema to a |
create | insert | parent, deployment_name, cdf_config | cdf_config_id | Create a CDF configuration that materializes the change data feed for all tables in a Postgres schema |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
parent | string | The parent database under which to create the CdfConfig. Format: projects/{project}/branches/{branch}/databases/{database} |
cdf_config_id | string | The user-specified id for the CdfConfig, forming the final segment of its resource name. Must match the pattern [a-z][a-z0-9_]{0,62}. Defaults to the Postgres schema name when omitted. |
page_size | integer | Maximum number of CdfConfigs to return. |
page_token | string | Pagination token returned by a previous ListCdfConfigs call. Empty on the first page. |
SELECT examples
- list
List all CDF configurations for a Lakebase database. Each configuration maps a Postgres schema to a
SELECT
name,
cdf_config_id,
catalog,
create_time,
postgres_schema,
schema
FROM databricks_workspace.postgres.postgres_cdf_configs
WHERE parent = '{{ parent }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create
- Manifest
Create a CDF configuration that materializes the change data feed for all tables in a Postgres schema
INSERT INTO databricks_workspace.postgres.postgres_cdf_configs (
cdf_config,
parent,
deployment_name,
cdf_config_id
)
SELECT
'{{ cdf_config }}' /* required */,
'{{ parent }}',
'{{ deployment_name }}',
'{{ cdf_config_id }}'
;
# Description fields are for documentation purposes
- name: postgres_cdf_configs
props:
- name: parent
value: "{{ parent }}"
description: Required parameter for the postgres_cdf_configs resource.
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the postgres_cdf_configs resource.
- name: cdf_config
description: |
The CdfConfig to create. The catalog, schema, and postgres_schema fields are required; all other fields are output only and ignored on input.
value:
catalog: "{{ catalog }}"
schema: "{{ schema }}"
postgres_schema: "{{ postgres_schema }}"
cdf_config_id: "{{ cdf_config_id }}"
create_time: "{{ create_time }}"
name: "{{ name }}"
- name: cdf_config_id
value: "{{ cdf_config_id }}"
description: The user-specified id for the CdfConfig, forming the final segment of its resource name. Must match the pattern ``[a-z][a-z0-9_]{0,62}``. Defaults to the Postgres schema name when omitted.
description: The user-specified id for the CdfConfig, forming the final segment of its resource name. Must match the pattern ``[a-z][a-z0-9_]{0,62}``. Defaults to the Postgres schema name when omitted.