Skip to main content
GuideServerConfigure and deploy Tabsdata servers on your machine.TutorialsConfigure data integration workflows within a running Tabsdata server.Advanced TutorialsBuild end-to-end workflows between two specific systems.API ReferenceCLI ReferenceRelease Notes
Version: 2.0.0

tabsdatak.conn.postgres

CdcColumnsFormatSpecLayout of the change-values payload on each emitted row: one of "columns", "struct" or "map".
CdcSrcCfgKey
CdcSrcCfgSpec
CredentialsSpecThe credential type for Postgres connections: UserPassword (user + password), spliced into the URI by the engine factory.
DestCfgKey
DestCfgSpec
IfTableExistsSpecWrite disposition when the target table exists: "append" adds rows; "replace" truncates before insert.
LsnPositionCDC start position: a WAL Log Sequence Number.
PostgresCdcStartFromSpecWhere a Postgres CDC stream begins: a "head" / "tail" keyword or an LsnPosition.
PostgresCdcStreamSrcPostgres CDC stream source for @stream_publisher.
PostgresCdcStreamSrcConnPostgres CDC connection used by PostgresCdcStreamSrc.
PostgresDestPostgres destination for @subscriber -- one target table per slot.
PostgresDestConnPostgres connection used by PostgresDest.
PostgresSrcPostgres source for @publisher -- one output slot per query.
PostgresSrcConnPostgres connection used by PostgresSrc.
PostgresTableNameSpecA Postgres table name -- table, schema.table or database.schema.table (at most three dot-separated parts).
PostgresTableNamesSpecA list of Postgres table names (see PostgresTableNameSpec).
QueriesSpecA non-empty, ordered list of SELECT statements -- one output slot per query.
RelativePositionSpecRelative CDC start position: "head" rewinds to the oldest change still retained on the replication slot; "tail" skips to the current WAL position (only changes made after the stream starts are emitted).
ReplicationSlotBehaviorSpecLogical replication slot strategy: "reuse" (default) requires the named slot to already exist; "create" creates it, doing nothing if it already exists.
SrcCfgKey
SrcCfgSpec
UriSpecA SQLAlchemy-style Postgres URI, e.g.
Wal2JsonFormatVersionSpecwal2json output-plugin format version: 2 (default, per-action messages with explicit begin/commit framing) or 1 (the older whole-transaction batch payload).

CdcColumnsFormatSpec

type_alias
CdcColumnsFormatSpec: Literal['columns', 'struct', 'map']

Layout of the change-values payload on each emitted row: one of "columns", "struct" or "map".


CdcSrcCfgKey

type_alias
CdcSrcCfgKey: Literal['postgres.cdc.blocking_timeout_seconds', 'postgres.cdc.logging_level', 'postgres.cdc.wal2json_format_version', 'tabsdata.cdc.buffer.max_rows', 'tabsdata.cdc.buffer.max_bytes', 'tabsdata.cdc.buffer.max_secs', 'tabsdata.cdc.trigger.max_rows', 'tabsdata.cdc.trigger.max_bytes', 'tabsdata.cdc.trigger.max_secs', 'tabsdata.cdc.poll_interval_seconds']

CdcSrcCfgSpec

type_alias
CdcSrcCfgSpec: Mapping[CdcSrcCfgKey, Any]

Resolved type:

Mapping[Literal['postgres.cdc.blocking_timeout_seconds', 'postgres.cdc.logging_level', 'postgres.cdc.wal2json_format_version', 'tabsdata.cdc.buffer.max_rows', 'tabsdata.cdc.buffer.max_bytes', 'tabsdata.cdc.buffer.max_secs', 'tabsdata.cdc.trigger.max_rows', 'tabsdata.cdc.trigger.max_bytes', 'tabsdata.cdc.trigger.max_secs', 'tabsdata.cdc.poll_interval_seconds'], Any]

CredentialsSpec

type_alias
CredentialsSpec: UserPassword

The credential type for Postgres connections: UserPassword (user

  • password), spliced into the URI by the engine factory.

DestCfgKey

type_alias
DestCfgKey: Literal['postgres.logging_level', 'tabsdata.sql.write_engine', 'tabsdata.sql.chunk_size']

DestCfgSpec

type_alias
DestCfgSpec: Mapping[DestCfgKey, Any]

Resolved type:

Mapping[Literal['postgres.logging_level', 'tabsdata.sql.write_engine', 'tabsdata.sql.chunk_size'], Any]

IfTableExistsSpec

type_alias
IfTableExistsSpec: Literal['append', 'replace']

Write disposition when the target table exists: "append" adds rows; "replace" truncates before insert.


PostgresCdcStartFromSpec

type_alias
PostgresCdcStartFromSpec: Union[RelativePositionSpec, LsnPosition]

Resolved type:

Literal['head', 'tail'] | LsnPosition

Where a Postgres CDC stream begins: a "head" / "tail" keyword or an LsnPosition.


PostgresTableNameSpec

type_alias
PostgresTableNameSpec: str

A Postgres table name -- table, schema.table or database.schema.table (at most three dot-separated parts). Parts may be double-quoted, using the doubled double-quote convention to embed a literal quote.


PostgresTableNamesSpec

type_alias
PostgresTableNamesSpec: list[PostgresTableNameSpec]

Resolved type:

list[str]

A list of Postgres table names (see PostgresTableNameSpec).


QueriesSpec

type_alias
QueriesSpec: list[str]

A non-empty, ordered list of SELECT statements -- one output slot per query.


RelativePositionSpec

type_alias
RelativePositionSpec: Literal['head', 'tail']

Relative CDC start position: "head" rewinds to the oldest change still retained on the replication slot; "tail" skips to the current WAL position (only changes made after the stream starts are emitted).


ReplicationSlotBehaviorSpec

type_alias
ReplicationSlotBehaviorSpec: Literal['create', 'reuse']

Logical replication slot strategy: "reuse" (default) requires the named slot to already exist; "create" creates it, doing nothing if it already exists.


SrcCfgKey

type_alias
SrcCfgKey: Literal['postgres.logging_level', 'tabsdata.sql.read_engine', 'tabsdata.sql.chunk_size', 'tabsdata.src_metadata.drop']

SrcCfgSpec

type_alias
SrcCfgSpec: Mapping[SrcCfgKey, Any]

Resolved type:

Mapping[Literal['postgres.logging_level', 'tabsdata.sql.read_engine', 'tabsdata.sql.chunk_size', 'tabsdata.src_metadata.drop'], Any]

UriSpec

type_alias
UriSpec: StrOrSecretSpec

Resolved type:

str | Secret

A SQLAlchemy-style Postgres URI, e.g. postgres+psycopg2://host:port/db. The scheme must be postgres or postgresql (an optional +driver is allowed). Accepts a plain string or a Secret.


Wal2JsonFormatVersionSpec

type_alias
Wal2JsonFormatVersionSpec: Literal[1, 2]

wal2json output-plugin format version: 2 (default, per-action messages with explicit begin/commit framing) or 1 (the older whole-transaction batch payload).