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 via a primary label. Your application’s source-of-truth data in the timeline. Supports discovery: given the connection URL it lists the tables it can see, then reads the chosen table’s columns to propose the cursor and labels.

Prerequisites: a Postgres reachable from the NavFlow host. The driver ships with NavFlow — no extra to install.

Set up

Ask a connected agent:

Use navflow to ingest the orders table at <dsn>, keyed by tenant_id.

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

Configuration

fieldtypedescription
dsn*string · secretpostgresql://user:pass@host:port/dbname — this source’s connection URL
table*stringtable to poll, e.g. orders or public.orders (Discover lists the tables)
cursor_column*stringcolumn that only ever grows — an id (inserts) or updated_at (also updates). Discover picks it
columnsstringcomma-separated columns to pull (empty = every column). The cursor / key / time columns are always included
time_columnstringtimestamp column for event_time (default: the cursor if it’s a timestamp, else ingest time)
limitnumberrows to fetch per poll
text_templatestring · advancedoptional str.format template over the row, e.g. '{tenant_id}: {status} ${amount}'

database and table are also available as label fields (from config), regardless of which columns you pull.

Verify

Open the source: 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