This article describes how to add a new or edit an existing PostgreSQL database connection for your Peak organization.
Contents
Process Overview
There are four stages that need to be completed when adding or editing a PostgreSQL connection:
- Connection
- Import Configuration
- Destination
- Trigger
To find out how to create new and edit existing data feeds, see Data Sources overview.
Connection
When setting up a connection, you can either use an existing one or create a new one.
If you are using an existing connection, you can leave the configuration parameters as they are or edit them.
To use an existing connection:
- At the Connection stage, from the Select Connection dropdown, choose the required connection.
The dropdown will be empty if there have not been any previous connections configured. - Enter the required connection parameters.
See below for details. - Click SAVE to save the parameters and move to the next step.
To create a new connection:
- At the Connection stage, click NEW CONNECTION.
- Enter the required connection parameters.
See below for details. - Click SAVE to save the parameters and move to the next step.
Connection Parameters
To make a connection to your chosen PostgreSQL database or edit the details of a preconfigured connection, complete these details:
- Connection Name
Enter a suitable name for the connection using alphanumeric characters. - Database Host
Enter the database host name.
This is usually a string, such as:
customers.domain.com - Database Port
This is usually 5432. - Database Username/Password/Name
Refer to https://www.postgresql.org/docs/
Testing your connection parameters
- Once you have completed your connection parameters, click the TEST button to make sure they are correct.
If the test fails, hover over 'i' for details. - If you need to connect through an SSH tunnel, tick the Connect through SSH box and complete the required details (see below).
- Click SAVE to save the parameters and move to the next step.
Connecting through SSH
If required, it is possible to make a connection through an encrypted SSH tunnel.
To do this, tick the Connect through SSH box and complete the required details.
- Password and Public Key
Connections can be made using a password or public key.
The public key should be added to your SSH server. - Whitelist IP Address
This is Peak’s external IP address. It is the same across all tenants.
Add this to your SSH server whitelist.
Import Configuration
Once a connection has been established and a table selected, the feed has to be configured so that data is updated and filtered in the most suitable way.
Selecting a table
Once a table is selected, you can:
- Preview the table data
- Configure the load data type:
- Truncate and insert
- Incremental
- Update and insert (upsert)
For more information, see Data feed load types.
- Filter fields by operator and value.
- Add a primary key.
This is only mandatory for an upsert feed. - Associate a project with the feed.
- Name the feed.
Naming the feed
Follow these guidelines when naming a feed:
- The name should be meaningful
- Only use alphanumeric characters and underscores.
- It must start with a letter.
- It must not end with an underscore.
- Use up to 50 characters.
Destination
The Destination stage enables you to choose a where your data will be stored.
If there are multiple options available, you can choose multiple destinations. The destinations available will depend on the data warehouse you use. For instance, Redshift users will see Redshift and S3 as options, while users of Snowflake will see Snowflake only.
For more information, see Choosing a destination for a data connector.
Setting a trigger
For a guide to setting triggers for your data feeds, see How to create a trigger for a data feed.