Skip to Content
ConnectorsPostgres table

Postgres table — postgres

Polls a table incrementally, one event per new/changed row. The cursor tracks a monotonic column (an autoincrement id, or updated_at); an entity column (e.g. tenant_id) becomes the key. Your application’s source-of-truth data in the timeline. Supports discovery: it reads information_schema to propose the cursor and key columns.

Prerequisites: the postgres extra (pip install 'navflow[postgres]') and a DSN — set the PG_DSN or DATABASE_URL environment variable on the daemon.

Set up

Ask a connected agent:

Use navflow to ingest the orders table, keyed by tenant_id.

The agent calls discover_source (reads information_schema, proposes the cursor and key columns), test_source (dry-run — fetches sample rows), then create_source. Walkthrough: Connect a Postgres table.

Configuration

fieldtypedescription
table*stringtable to poll, e.g. orders or public.orders
cursor_column*stringmonotonic column tracking new rows: an id or updated_at
cursor_typestringint (autoincrement, the default) or timestamp (updated_at)
key_columnstringcolumn whose value is the entity key, e.g. tenant_id
time_columnstringtimestamp column for event_time (default: the cursor column if it is a timestamp, else ingest time)
limitnumberrows per poll (default 200)
dsnstringpostgresql://user:pass@host:port/db (prefer PG_DSN)
text_templatestringoptional str.format template over the row, e.g. '{tenant_id}: {status} ${amount}'

Prefer the PG_DSN / DATABASE_URL environment variable over the dsn field — a DSN in the config is exported to the catalog YAML.

Verify

Open the source in the console: Recent events shows rows on the next poll; Fields reports each column’s coverage — use it to confirm the key column is reliably present.

Last updated on