PostgreSQL

Follow these steps to use PostgreSQL as your source.

Prerequisite - Configure PostgreSQL for CDC

Upsolver supports ingesting CDC data from relational databases including PostgreSQL. Upsolver provides CDC capabilities by running a Debezium Engine under the hood. Connectors detect and ingest changes automatically.

Prerequisite: Follow the linked guide to prepare PostgreSQL for CDC.

Step 1 - Connect to PostgreSQL

Create a new connection

Click Create a new connection, if it is not already selected.

Enter your connection string in the following format:

jdbc:postgresql://HOST:PORT/DB_NAME 

where:

  • HOST - hostname (e.g. database instance endpoint in AWS RDS)

  • PORT - port number

  • DB_NAME - database name

Provide the Username and Password to authenticate to the database.

In the Name your connection field, type in the name for this connection. Please note this connection will be available to other users in your organization.

Use an existing connection

By default, if you have already created a connection, Upsolver selects Use an existing connection, and your PostgreSQL connection is populated in the list.

For organizations with multiple connections, select the source connection you want to use.

Step 2 - Select schemas, tables, and columns to ingest

Upsolver uses a Heartbeat Table to protect your database server from high disk usage. Although this is an optional setting, it is best practice to include a Heartbeat table, especially when the source database does not contain at least one frequently changing table.

Select an option from:

  • Start without Heartbeat table

  • Use an existing Heartbeat table: choose the Heartbeat table from the select list

  • Create a new table: select a schema, enter a table name, and click Create

There are two ways to replicate objects to the target:

  1. Manually select the schemas, tables, and columns.

  2. Use regular expressions to specify which tables are included and which columns are excluded.

The following examples show how to use a regular expression to include specific tables:

ExpressionResults

db_name.*

Select all tables in the db_name database

db_name.users, db_name.items

Select users and items tables in the db_name database

db1.items_.*

Select all tables in the db1 database that start with items_

By default, Upsolver ingests all columns in the tables that match the regular expression. Below are examples of regular expressions to exclude columns from included tables:

ExpressionResults

db.users.address_.*

Select all columns starting with address_ in the users table in the db database.

db.*.(.*_pii)

Select all columns ending in _pii across all tables in the db database.

Note

If a PostgreSQL table does not have a primary key, the ingestion will be insert only. Auto-generated jobs assume that the source table has a primary key that can be used for the ON clause, e.g. source.PK = target.PK.

No error is displayed if a primary key does not exist, so please be aware of this prior to creating your ingestion job.

Schema evolution

By default, new schemas, tables, and columns added after the job is launched, will be replicated to the target.

You can overwrite the default behavior and set specific behavior for newly created schemas, tables in a specific schema, or columns in a specific table.

Last updated