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
| Field | What to enter | Example | Required |
|---|---|---|---|
| JDBC URL | The PostgreSQL connection URL, including one approved sslmode | jdbc:postgresql://postgres.example.com:5432/analytics?sslmode=verify-full | Yes |
| Table Name | The table name, optionally preceded by its schema | reporting.orders | Yes |
| Key Columns | One or more columns that uniquely identify a row | order_id | Yes |
| Non Key Columns | The remaining columns SQIP should write | customer_id, status, total | No |
| Insert Mode | UPSERT, INSERT, or UPDATE | UPSERT | No |
| Null Value Action | FAIL or DELETE when a record has a null value | FAIL | No |
| Batch Size | Maximum records grouped into one database write | 200 | No |
| Timeout Ms | Maximum wait before a partial batch is written | 500 | No |
| Max Queue Size | Maximum records waiting to be written | 2000 | No |
| Parallelism | Number of connector instances | 1 | Yes; allowed range 1–8 |
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_MODEExample:
jdbc:postgresql://postgres.example.com:5432/analytics?sslmode=verify-fullAllowed TLS modes are require, verify-ca, and verify-full. Do not include a username or password in the URL.
Insert modes
| Insert Mode | What happens | When to use it |
|---|---|---|
UPSERT | Inserts a new row or updates the existing row with the same key | Recommended for most data synchronization |
INSERT | Always attempts to insert a new row | Use when every record represents a new unique row |
UPDATE | Updates an existing row with the same key | Use when rows already exist in the table |
Null value actions
| Action | What happens |
|---|---|
FAIL | Stops that record from being applied and reports an error |
DELETE | Deletes 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
| Field | Input |
|---|---|
| JDBC URL | jdbc:postgresql://postgres.example.com:5432/analytics?sslmode=verify-full |
| Table Name | reporting.orders |
| Key Columns | order_id |
| Non Key Columns | customer_id, status, total |
| Insert Mode | UPSERT |
| Null Value Action | FAIL |
| Batch Size | 200 |
| Timeout Ms | 500 |
| Max Queue Size | 2000 |
| One-time username and password | Enter 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 supportedsslmode. - 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.