PostgreSQL

Connect your PostgreSQL data source to Datachecks.

1. Create a PostgreSQL Read-Only User

To connect to PostgreSQL, you need to create a user with read-only access to all tables in all schemas and write access to the datachecks-specific schema for temporary tables:

 /* Create a temporary schema for datachecks */
 CREATE SCHEMA datachecks_tmp;

 /* Create a datachecks user */
 CREATE ROLE datachecks WITH LOGIN ENCRYPTED PASSWORD 'SOMESECUREPASSWORD';

 /* Grant all privileges on the temporary schema to datachecks */
 GRANT ALL ON SCHEMA datachecks_tmp TO datachecks;

 /* Grant read-only access to all tables in the specified schema */
 GRANT USAGE ON SCHEMA <myschema> TO datachecks;
 GRANT SELECT ON ALL TABLES IN SCHEMA <myschema> TO datachecks;

Your new read-only user now has the necessary permissions for Datachecks to connect to your PostgreSQL database securely.

Datachecks uses the datachecks_tmp chema for temporary processing, ensuring that core data structures remain intact. This isolation prevents any impact on critical data during validation and monitoring tasks.

2. Add PostgreSQL as a data source in Datachecks

Go to Settings > Datasources, click New Datasource, and select Postgres to configure the connection to your database.

Once selected, you’ll be directed to the configuration page. Enter the following details:

Field NameDescription
HostThe name of the server that hosts your database.
PortThe default port is 5432. If your server uses a different port, specify that.
UsernameThe name of the dedicated user for Datachecks.
PasswordThe password of the Datachecks user.
DatabaseThe name of the Postgres database you want to connect to.
SchemaSpecify the schema you want to access (optional).
Connection NameA name given to the data connection within Datachecks.

Click Test & Save Datasource. Your data connection is ready!