Overview
In modern technology, there is a clear need to reuse objects and let the user configure each object once and repeatedly use it over and over again.
This is the basic assumption of the “Connection” configuration in Totango Customer Data Hub.
Connection to a data source is usually done by Ops or Data teams, and the main idea is that it will be configured once and you can reuse the same connection for several integrations.
Important note, the Data Warehouse integration family is a closed system, therefore, the data source connectors which are created can be re-used for only Data Warehouse integrations and not for other integration families.
Topics covered in this article:
- Creating PostgreSQL Connection
- Configuring PostgreSQL Connection
- Customer Data Hub Whitelisting
- SSL Encryption
Creating PostgreSQL Connection
- Go to your Totango instance and click on Global Settings > Data Management > Customer Data Hub > Click 'Data Warehouse' and select PostgreSQL
(note: you will need Totango admin privileges). - Create a new connection (or review your existing connections)
Configure PostgreSQL Connection
The PostgreSQL connector is a pure DB connection. It means that it is built as a connector and an SQL query which powers this connection.
Common information regarding PostgreSQL can be found here.
Note: It is recommended to create a specific user for fetching data from DB with proper DB access permissions (e.g. user with only-read access to a specific schema or a table).
Creating a PostgreSQL connector include 2 steps:
- Create a read-only user with access to the desired schema
- Create connector in Totango
Create a PostgreSQL User
Follow these steps to create a read-only user:
- Connect to your PostgreSQL DB
-
. To create a read-only user for a particular table/tables:
CREATE ROLE 'totango_ro_user' WITH LOGIN PASSWORD password NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION VALID UNTIL ‘infinity’;
- To give the user access to the database from any host:
GRANT SELECT ON table_name.* TO 'totango_ro_user';
-
If you know the hostname or IP address of the host that the collector is will be installed on, type the following command:
GRANT SELECT ON table_name.* to 'totango_ro_user'@'hostname or IP_address';
More information about user creation can be found here.
Create Connector in Totango
- Name: a meaningful connection name to the Snowflake connection, For example, “Company DWH - Customer data”
- Description: a meaningful description to help you and others understand the essence of this connection.
- Hostname: Hostname of your PostgreSQL instance.
- Username: username of the user you plan to give access to your DB for Totango App
- Password: password of your user
- Schema: The schema where this connector data should be fetched from
- Database: The database where this connector data should be fetched from
Important note
In case your company uses VPN to allow access to your PostgreSQL database, the Totango system will not be able to access it. If you want the Totango system to retrieve data from a PostgreSQL database, please create an accessible PostgreSQL database outside your network and push only the relevant information to this PostgreSQL database in a secure manner.
PostgreSQL Connection Q & A
- Q: How does Totango connect to the PostgreSQL database?
A: Totango connects via JDBC (Java Database Connectivity) using PostgreSQL JDBC 42.2.12 driver. - Q: JDBC supports a read-only connection mode, is that being used for the PostgreSQL connector?
A: Yes. Totango uses a read-only connection mode. - Q: Can I change the PostgreSQL database port?
A: Yes. you can define any port number.
Customer Data Hub Whitelisting
In the event that your network is behind a firewall, you will need to whitelist our servers so that we may retrieve information from your data warehouse.
Please follow the instructions in this Customer Data Hub IP Whitelisting article to configure your IP whitelist.
SSL Encryption
All data warehouse connectors support SSL encryption out-of-the-box (no need to configure anything to enable SSL encryption).
Totango connectors will use an SSL encrypted connection in case it is activated and use a non-SSL encrypted connection otherwise.
The implementation logic is as follows:
by default, SSL encryption is used during connecting, if the data warehouse server does not support SSL encryption, then the connection will using an unencrypted connection to stream data from the data warehouse.
Read more on how to configure SSH tunnel for PostgreSQL
Comments
0 comments
Please sign in to leave a comment.