This page walks through how to connect Census with your PostgreSQL database.
This guide will walk you through connecting to PostgreSQL as a destination.
To use Postgres as a destination, Census requires permission to write to the desired destination tables, as well as read metadata about the table and database structures.
-- Note that creating a user may be redundant if you're already configured
-- Postgres as a source.
-- Give the census user the ability to sign in with a password
CREATE USER CENSUS WITH PASSWORD '<strong, unique password>';
-- Let the census user see this schema
GRANT USAGE ON SCHEMA "<your schema>" TO CENSUS;
-- Let the census user read all existing tables in this schema
-- Note: this can also be granted to specific tables as well
GRANT SELECT, INSERT, UPDATE ON ALL TABLES IN SCHEMA "<your schema>" TO CENSUS;
We support syncing data to Tables in PostgreSQL, but they must have a uniqueness constraint on a column.
Census can successfully connect to PostgreSQL instances that are using advanced networking controls including region constraints, IP address allow lists, or SSH Tunneling. For more information, see our Network Access Controls documentation.