Postgres
Getting Started with Postgres Source Configuration
Requirements:
Active Postgres database instance.
Allow connections from DataBrain to your Postgres database.
For details on setting up IP whitelisting and ensuring secure connectivity, refer to our guide on
Choose the DataBrain Workspace to which you wish to connect the data.
Setup Guide:
Ensure Database Accessibility:
Ensure your Postgres database is active and accessible from the machine running DataBrain.
Accessibility is dependent on your Postgres user privileges and network settings. The easiest way to verify if DataBrain can connect to your Postgres database is via the check connection tool in the UI. For detailed setup and permissions, refer to the Postgres documentation.
Grant Necessary Permissions:
Read Access on Tables and information_schema: Grant read access permissions to the tables within Postgres as well as the information_schema schema. This allows DataBrain to retrieve necessary information and replicate data accurately. You can assign appropriate permissions to the user or role accessing Postgres to enable reading from tables and accessing metadata stored in the information_schema. -- Grant SELECT permission on all tables in the specified schema GRANT SELECT ON ALL TABLES IN SCHEMA <schema_name> TO <username>
Fill Up Connection Info:
Provide the necessary information to connect to your Postgres database:
Integration Name: [Pick a name to help you identify this source in DataBrain]
Host: [Hostname of the database]
Port: 5432 (This is the default port for Postgres databases)
Database Name: [Name of the database]
Username: [Username to access the database]
Password: [Password associated with the username]
Schemas: Defaults to "public". [Provide a list of schemas (case sensitive) to sync from, if different from the default]
Encryption:
SSL Mode: [Specify if the "require_secure_transport" parameter is turned on then enable or disable based on it]
To securely connect to your Postgres instance, you might need to provide SSH details:
SSH Host: [SSH host endpoint of the SSH instance. Ensure the DataBrain IP is whitelisted.]
SSH Port: 22
Username: [Username to connect to SSH host]
Private Key: [Private key to authenticate with the SSH host]
Ensure you have SSL/TLS set up for your Postgres database if you require encrypted connections from DataBrain for enhanced security.
Permissions:
Permission to read
information_schema
.Whitelist the IP address.
Grant read access to the schema (usage) and tables, noting that access to only tables may not suffice in certain databases.
Replace the placeholders inside the square brackets with the actual values when filling in the details.
Locating the Configuration Details in PostgreSQL
Host:
For remote PostgreSQL servers, it would be the IP address or domain name of the machine where PostgreSQL is running. You can also check the PostgreSQL configuration file (usually named
postgresql.conf
) for thelisten_addresses
setting to confirm.
Port:
The default port for PostgreSQL is
5432
. However, this can be customized. Confirm the specific port your PostgreSQL instance is using by checking thepostgresql.conf
file for theport
setting.
Database Name:
Connect to your PostgreSQL instance and use the command
\\l
in thepsql
interface to list all databases.
Username:
The credentials you use to access your PostgreSQL database. If you're unsure, consult with the person who set up the PostgreSQL database or your database administrator. Usernames can also be listed by connecting to your database and running the command
\\du
in thepsql
interface.
Password:
The password associated with the username. This would typically be known by you or set up during the PostgreSQL installation or user creation. PostgreSQL doesn't display passwords for security reasons, so ensure you have it stored securely or reset it if needed.
Schemas:
By default, PostgreSQL uses the "public" schema. If you have other schemas in use, connect to your database and run the command
\\dn
in thepsql
interface to list them.
SSL mode:
PostgreSQL supports various SSL modes. To check the mode in use, refer to the
postgresql.conf
file for thesslmode
setting or consult with your database administrator.
Last updated