Connectors

PostgreSQL JDBC sink

Write records from a SQIP topic into a PostgreSQL table

Use the PostgreSQL JDBC sink to write records from a SQIP topic into a PostgreSQL table.

Before you begin

Ask your database administrator for:

  • The PostgreSQL hostname, port, database name, and TLS mode.
  • The destination table name.
  • The key column or columns that uniquely identify a row.
  • The remaining columns that should be written.
  • A username and password with permission to write to the table.

The incoming record fields must match the destination column names and compatible PostgreSQL data types.

Install the connector

Select the connector

In Connectors, find PostgreSQL JDBC Sink and select Select and install.

Choose the input

Enter an installation name, select the tenant, cluster, and namespace, and choose the input topic whose records should be written to PostgreSQL.

Configure the destination table

Enter the database URL, table, columns, and write behavior using the table below.

Add credentials

Enter or select the PostgreSQL username and password in SQIP's credential section.

Install and verify

Select Install connector and wait for Running. Send a test record to the input topic and confirm that the destination row is created or updated.

Configuration fields

FieldWhat to enterExampleRequired
JDBC URLThe PostgreSQL connection URL, including one approved sslmodejdbc:postgresql://postgres.example.com:5432/analytics?sslmode=verify-fullYes
Table NameThe table name, optionally preceded by its schemareporting.ordersYes
Key ColumnsOne or more columns that uniquely identify a roworder_idYes
Non Key ColumnsThe remaining columns SQIP should writecustomer_id, status, totalNo
Insert ModeUPSERT, INSERT, or UPDATEUPSERTNo
Null Value ActionFAIL or DELETE when a record has a null valueFAILNo
Batch SizeMaximum records grouped into one database write200No
Timeout MsMaximum wait before a partial batch is written500No
Max Queue SizeMaximum records waiting to be written2000No
ParallelismNumber of connector instances1Yes; allowed range 18

Enter the database Username and Password under One-time credentials. If your administrator supplied a prepared secret name, expand Use an existing secret reference instead and enter that name. Do not use both approaches.

JDBC URL format

Use this pattern:

jdbc:postgresql://HOST:PORT/DATABASE?sslmode=TLS_MODE

Example:

jdbc:postgresql://postgres.example.com:5432/analytics?sslmode=verify-full

Allowed TLS modes are require, verify-ca, and verify-full. Do not include a username or password in the URL.

Insert modes

Insert ModeWhat happensWhen to use it
UPSERTInserts a new row or updates the existing row with the same keyRecommended for most data synchronization
INSERTAlways attempts to insert a new rowUse when every record represents a new unique row
UPDATEUpdates an existing row with the same keyUse when rows already exist in the table

Null value actions

ActionWhat happens
FAILStops that record from being applied and reports an error
DELETEDeletes the destination row identified by the key columns

Warning

Choose DELETE only when null records from the input topic are intentionally used to delete database rows.

Complete example

FieldInput
JDBC URLjdbc:postgresql://postgres.example.com:5432/analytics?sslmode=verify-full
Table Namereporting.orders
Key Columnsorder_id
Non Key Columnscustomer_id, status, total
Insert ModeUPSERT
Null Value ActionFAIL
Batch Size200
Timeout Ms500
Max Queue Size2000
One-time username and passwordEnter the database credential, or use an existing secret reference

Tip

Use UPSERT with stable key columns to make retries safe and prevent duplicate rows.

If installation fails

  • Confirm that the JDBC URL starts with jdbc:postgresql:// and contains exactly one supported sslmode.
  • Confirm that the URL does not contain a username or password.
  • Confirm that the table and column names exactly match PostgreSQL, including capitalization.
  • Confirm that Key Columns identify a unique row and are present in every input record.
  • Confirm that Max Queue Size is equal to or greater than Batch Size.
  • If the database is private, ask your SQIP administrator to approve access.