Introduction
valmi.io can be used to sync data from a PostgreSQL database to any of the supported destinations. This document describes how to configure a PostgreSQL connection and how to use it to create a sync.PostgreSQL Configuration
Required Permissions
valmi.io retrieves data from one or more tables in your database, which may be located in different schema, and transfers it to corresponding objects in supported destinations. To minimize the impact on your database’s performance and other applications’ APIs, valmi.io calculates a “diff” to identify the changes between each update. For this purpose, valmi.io generates and writes to a set of tables in a private bookkeeping schema (usually 2 or 3 tables per configured sync job). We recommend creating a dedicated user account specifically for valmi.io, with a strong and unique password. This account is used by valmi.io to establish a connection with your PostgreSQL database. To ensure the correct functioning of the valmi.io connection, the valmi account must possess the following permissions:- The account should have full administrative access to all tables within the bookkeeping schema, including the capability to create and delete tables, as well as read from and write to all tables.
- Read-only access to any tables and views in any schema that you wish valmi.io to publish to your service destinations.
Creating a PostgreSQL Connection on valmi.io
The picture below shows the configuration page for a Postgres connection. The following fields are required:- Connection Name - A name for the connection.
- Host - The hostname of the Postgres server.
- Port - The port number of the Postgres server. The default port is
5432
. - Database - The name of the database to connect to.
- Username - The username to use to connect to the database.
- Password - The password to use to connect to the database.


Setting up a Sync
-
Selecting a table or a view to Sync
- Select the Postgres connection you created earlier.
- Select a namespace.
- Select a database table or a view.

-
Supported Source Modes
- Full Table - This mode extracts the entire table from Postgres. This is the default mode.
- Incremental - This mode extracts only the rows that have changed since the last sync. The data to extract will be determined by comparing the current table with a snapshot of the table taken during the last sync.

-
Selecting a Primary Key
- It can be used to identify an object on the destination. For example, if you are syncing a Postgres table to a Salesforce object, the primary key will be used to identify the Salesforce object.
- It can be used to identify valid and invalid rows. For example, null checks and duplicate checks are performed on the primary key.