Loading the documentation…

Connect PostgreSQL

The Postgres source reads tables and views from one PostgreSQL database into the Lake. Use this page to fill in each field of the Postgres form. The steps shared by every SQL engine are on Connect a SQL database.


Prerequisites


Add the source

  1. Open Lake and click Add datasource, or open the New menu in the toolbar above the tree.
  2. Choose Postgres in the picker.
  3. Fill in the General, Connection and Datetime steps as described below.
  4. Click Add.

Connection settings

General step

Name (Mandatory)

Code (Mandatory)

Folder (Optional)

Connection step: Address

Paste connection string (Optional)

Host (Mandatory)

Port (Mandatory)

Database (Mandatory)

Connection step: Authentication

Username (Mandatory)

Password (Mandatory)

Connection step: Security

SSL/TLS (Optional)

Datetime step

Timezone (Optional)

Datetime values (Optional)

Timezones and datetime values explains both settings in full.


Test and save

  1. On the Connection step, click Test connection. The button reads Testing… while it runs.
  2. Connection test passed means DataMind reached the server and signed in. A passing test can also show Detected source timezone: with the zone the server reports. Connection test failed shows the server's message with a copy button.
  3. On Datetime, check the summary: Name, Server, Database, Username and Security.
  4. Click Add. Then import its tables.

The test is optional and never saves the source. To edit or duplicate the source later, see Connect a SQL database.


Questions, answered

Why is Database required for PostgreSQL?

A PostgreSQL connection is made to one database, so the source reads that database and the schemas inside it. To load from another database on the same server, add a second Postgres source.

Which schemas will I see?

The schemas of the chosen database that hold tables or views the user can see. A schema the user has no access to does not appear.

The server only accepts encrypted connections. What do I change?

Turn on SSL/TLS under Security and test again. The server certificate is not validated, so a self-signed or internal-CA certificate needs no extra setting.

Can I connect Amazon Redshift with the Postgres card?

Use the Amazon Redshift card instead. It starts on port 5439 with SSL/TLS on. See Connect Amazon Redshift.

Can I send data back to PostgreSQL?

Yes. Postgres is also offered as a Writeback destination, with the same connection fields. See Add and manage destinations.