Skip to content
datasquares.aiSign inStart free

Connect DataDatabases

PostgreSQL

You connect PostgreSQL from the DataSquares connection wizard. Connect with host, port and database credentials.

  1. In DataSquares, open Data Sources and choose Connect Source. The Connect a data source page opens.

  2. Pick PostgreSQL on that page (search or browse by category).

  3. Fill in the connection details below, then test the connection and save.

Field What to enter
Host The hostname or IP address of your PostgreSQL server.
Port Prefilled with 5432 (the PostgreSQL default) — change it if your server listens elsewhere.
Database The database to connect to.
Username / Password Credentials for a user with read access to the tables you want to analyze.
TLS On by default: Use SSL/TLS encryption connects encrypted and verifies the server certificate. Tick Trust self-signed certificate for a private CA; turn TLS off only for a server that has none.

Grant the connection user read-only access — DataSquares only ever reads from your source.

Create a dedicated user with SELECT on what DataSquares should see:

CREATE USER datasquares WITH PASSWORD '********';
GRANT CONNECT ON DATABASE analytics TO datasquares;
GRANT USAGE ON SCHEMA public TO datasquares;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO datasquares;
-- future tables too:
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO datasquares;

Managed Postgres (RDS, Cloud SQL, Azure, Neon, Supabase) generally requires TLS — turn the toggle on. For self-hosted servers, enable ssl = on in postgresql.conf or leave the toggle off on trusted networks.

Test Connection shows a short summary, such as Authentication failed — check the username and password. The text below is what the database itself reports, for example in the SQL editor.

Error Cause / fix
password authentication failed for user wrong credentials, or the user isn’t allowed from this host — check pg_hba.conf
no pg_hba.conf entry for host add a host rule for the DataSquares server’s IP (or your provider’s allowlist)
database "x" does not exist the Database field wants the database name, not the schema
connection timeout port 5432 not reachable — security group / firewall

The connection form asks for the host, port, database, username and password. Use a read-only database user.

  1. Choose Connect Source, then PostgreSQL on the page that opens. Search the page if you know the connector by name.

    Choose Connect Source, then PostgreSQL on the page that opens. Search the page if you know the connector by name.
  2. Fill in the connection name, host, port, database, username and password. Keep Use SSL/TLS encryption on for any server that offers it, and connect with a read-only database user. Choose Test Connection to try the credentials before you save, then Save & Discover; DataSquares reads the tables in the background.

    Fill in the connection name, host, port, database, username and password. Keep Use SSL/TLS encryption on for any server that offers it, and connect with a read-only database user. Choose Test Connection to try the credentials before you save, then Save & Discover; DataSquares reads the tables in the background.
  3. If the host is a private or loopback address, DataSquares refuses it and says so, in the form: This host is not allowed: private and loopback addresses can't be reached from DataSquares. The form stays open so you can correct the host. Use a host name that DataSquares can reach over the internet, or a source added by your administrator for an internal network.

    If the host is a private or loopback address, DataSquares refuses it and says so, in the form: This host is not allowed: private and loopback addresses can't be reached from DataSquares. The form stays open so you can correct the host. Use a host name that DataSquares can reach over the internet, or a source added by your administrator for an internal network.
  4. A saved source shows a plain status on its card: Not tested at first, then Connected once Test has reached the database. Test any time to re-check it.

    A saved source shows a plain status on its card: Not tested at first, then Connected once Test has reached the database. Test any time to re-check it.