PostgreSQL (Source)
Reads data from PostgreSQL tables.
Configuration
yaml
source:
kind: postgres
host: localhost
port: 5432
user: postgres
password: ${POSTGRES_PASSWORD}
database: mydb| Field | Default | Description |
|---|---|---|
host | localhost | Postgres host |
port | 5432 | Postgres port |
user | postgres | Username |
password | Password | |
database | Database name | |
connection_string | Full connection string (overrides individual fields) | |
tables | (auto-discover) | Optional list of tables to read |
query | Custom SQL query (overrides tables) | |
batch_size_rows | 10000 | Rows per ingest batch |
Namespace: postgres.{table_name}
CLI
bash
skippr connect source postgres-source \
--host localhost --port 5432 \
--user myuser --password mypass \
--database mydb \
--tables public.customers,public.orders| Flag | Description |
|---|---|
--host | Postgres host |
--port | Postgres port (default: 5432) |
--user | Username |
--password | Password |
--database | Database name |
--connection-string | Full connection string (overrides individual fields) |
--tables | Comma-separated list of tables |
--query | SQL query instead of table list |
Authentication
| Variable | Default | Description |
|---|---|---|
POSTGRES_HOST | localhost | PostgreSQL host |
POSTGRES_PORT | 5432 | PostgreSQL port |
POSTGRES_USER | Database user | |
POSTGRES_PASSWORD | Database password | |
POSTGRES_SSLMODE | SSL mode (e.g. disable, require, prefer) |
Troubleshooting
| Symptom | Fix |
|---|---|
connection refused | Check POSTGRES_HOST and POSTGRES_PORT are correct and the server is running |
password authentication failed | Verify POSTGRES_USER and POSTGRES_PASSWORD |
| SSL errors | Set POSTGRES_SSLMODE=disable for local development |
CDC
PostgreSQL supports real-time Change Data Capture via WAL logical replication. Add cdc_enabled: true to the source config and configure a pipeline cdc: block.
See CDC Sources -- PostgreSQL for prerequisites, configuration, and resume behavior.
