PostgreSQL is a popular, open-source relational database (RDMBS). You can connect to any table in any schema in PostgreSQL and create a Gtmhub entity based on it.

How to connect

  • In Gtmhub, navigate to Setup > Data Sources screen
  • Click on the Add new Data Source button
  • From the Choose a Data Source dialog, select PostgreSQL from Databases tab

Enter the necessary information to connect to your PostgreSQL database:

  • host: the address of the PostgreSQL instance. It could be a domain name or an IP address. This instance should allow remote access.
  • database: the name of the database
  • schema: the name of the schema to which you want to connect
  • username: the name of the user with which you wish to connect
  • password: the password of the user with which you wish to connect
  • port: the port where PostgreSQL is listening. The default is 5432, which is a standard PostgreSQL port

Click on the Connect button.

  • Choose a table to which you want to connect and click on the Use ... button
  • Give the name to your data source, something that makes sense to you and select the sync schedule (how often you want this data source to be synced automatically)
  • Click on the Add my data source button

Note: Gtmhub will be connecting from IP address 185.14.186.49, so make sure your firewall and PostgreSQL database are configured to allow a connection from that IP address.

What data from PostgreSQL can I use

You can sync any field from any table in any schema that is accessible to the user with which you connected to PostgreSQL database.

Gtmhub will automatically coerce types for you, so for example date and timestamp can both be mapped to Gtmhub date type.

Did this answer your question?