Skip to content

PostgreSQL (Destination)

Install

See the Install guide for the full setup, including Windows PowerShell.

curl -fsSL https://install.skippr.io/install.sh | shClick to copy

Installing Skippr means accepting the Skippr EULA.

Loads data into PostgreSQL tables.

Configuration

yaml
data_sinks:
  warehouse:
    Postgres:
      host: localhost
      port: 5432
      user: ${POSTGRES_USER}
      password: ${POSTGRES_PASSWORD}
      database: analytics
      schema: raw
FieldDefaultDescription
hostlocalhostPostgreSQL host
port5432PostgreSQL port
userDatabase user
passwordDatabase password
database(required)PostgreSQL database name
schemapublicTarget schema
sslmodeLibpq-style SSL mode (disable, require, prefer)

CLI

bash
skippr connect warehouse postgres \
  --host localhost \
  --port 5432 \
  --user myuser \
  --password '${POSTGRES_PASSWORD}' \
  --database analytics \
  --schema public \
  --sslmode prefer

Or run without flags to be prompted interactively.

FlagDescription
--hostPostgreSQL host
--portPostgreSQL port
--userDatabase user
--passwordDatabase password
--databasePostgreSQL database name
--schemaTarget schema (default: public)
--sslmodeSSL mode

Config output

Running connect warehouse postgres writes the following to skippr.yml:

yaml
data_sinks:
  warehouse:
    Postgres:
      host: localhost
      port: 5432
      user: ${POSTGRES_USER}
      password: ${POSTGRES_PASSWORD}
      database: analytics
      schema: public
      sslmode: prefer

Authentication

Authentication uses environment variables. Credentials are never stored in the config file.

VariableDefaultDescription
POSTGRES_HOSTlocalhostPostgreSQL host
POSTGRES_PORT5432PostgreSQL port
POSTGRES_USERDatabase user
POSTGRES_PASSWORDDatabase password
POSTGRES_DATABASEDatabase name (overrides config file)
POSTGRES_SCHEMApublicTarget schema (overrides config file)
POSTGRES_SSLMODESSL mode (e.g. disable, require, prefer)

Example

bash
export POSTGRES_HOST="localhost"
export POSTGRES_USER="myuser"
export POSTGRES_PASSWORD="mypassword"

Permissions or Network Requirements

The database user needs:

  • CREATE on the target database (for silver/gold schema creation)
  • USAGE and CREATE on the target schema (for loading data)
  • Ability to create tables and insert data

Troubleshooting

SymptomFix
connection refusedCheck POSTGRES_HOST and POSTGRES_PORT are correct and the server is running
password authentication failedVerify POSTGRES_USER and POSTGRES_PASSWORD
database "..." does not existCreate the database first, or check the database field in config
SSL errorsSet POSTGRES_SSLMODE=disable for local development

CDC Support

PostgreSQL destination supports CDC with exactly-once final-state reconciliation via staging-table MERGE semantics. Skippr automatically creates _skippr_order_token columns and tombstone tables.

See CDC Destinations -- PostgreSQL for details.

Next steps

Install

See the Install guide for the full setup, including Windows PowerShell.

curl -fsSL https://install.skippr.io/install.sh | shClick to copy

Installing Skippr means accepting the Skippr EULA.