PostgreSQL
Last updated
Last updated
Connection type: SQL Credentials
Features:
Import Users from PostgreSQL to Cohort
Contact your PostgreSQL administrator to create a Postgres user for the Cohort integration. This user must have read access to the table or view containing the Users.
Provide the connection URL for that user to the database. It usually looks like this: postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...]
Provide the schema that contains the data
Provide the SSL Certificate for connecting securely to the database (recommended)
Activate the Enable user import
toggle
Type the SQL query that should be executed to fetch the users.
Only top-level SELECT
queries are supported
The query must returned one row per user to import
The query must return an email
column containing the email of the user
The query must return one column per User Property that must be imported into Cohort
If the query returns an updated_at
datetime column, it will be used to fetch only the users that have changed since the last import ran. This is highly recommended if you have a large number of users for performance and cost.
You can use joins, subqueries or any other valid Postsgres query that will return one row per user. If your query is to complex and expensive to compute, we recommend making a materialized view in your database and querying the view.
Click on Run Query
to test your query
Match the columns with the User Properties you want to import
By default the query will be ran every day at midnight UTC to import new users, as long as the sync is active. If you would like to change the frequency or scheduling, please get in touch with your account manager.