Setup of Gluesync data capture (GDC)

Prerequisites

In order to have Gluesync working on your PostgreSQL instance you will need to have:

  • valid user credentials with permissions to read, create triggers and write to the target tables and respective database

To create a valid user for Gluesync on your PostgreSQL database to run GDC you can run/adapt the following query:
CREATE USER gsuser SUPERUSER;
ALTER USER gsuser WITH PASSWORD 'youdecide';

Basic configuration example

This module can be customized by using a configuration file, in JSON format. The file name to use must be specified as a parameter when launching the app, with the -f or --file tokens. The file should be composed by a union of common configuration files (see here Installation steps) and source/destination specific configuration:

{
  ...
  "postgres": {
    "certificatesPath": "/path/to/certs/dir/cert.pem","tableKeys": {
      "articles": ["id1", "id2"],
      "drivers": ["driver_unique_id"],
      "customers": [
          "customer_name",
          "customer_surname",
          "customer_age",
          "customer_id"
        ]
    }
  },

  "sourceChangeRetention": 5
}

PostgreSQL-specific configurations are listed under the postgres property:

  • certificatesPath (optional): the path to the certificates that need to be used when connecting to a PostgreSQL instance using a secure connection. If omitted, no certificates are used;

  • tableKeys: is the object that represents the key-value pair list of tables and its columns that compose the clustered (compound) index or the column Gluesync will use as a primary key. To read more about this feature we suggest you have a look at the following link.

You can also specify a few other options that apply to this configuration, like:

  • sourceChangeRetention (optional): defaults to 5. Number of retention days preserved in the Gluesync GDC action_logs table inside your Postgres database;

Looking for data modeling features or other options?

For more detailed configuration options, including the ability to perform data modeling, please have a look at the dedicated Data modeling section when sourcing from an RDBMS.