Connect a Postgres integration

Connect a PostgreSQL (or Postgres-compatible) database to Tekst so Tekst can read the ERP data you keep there. For example, Process Intelligence can use SAP's sales, delivery and billing tables (such as vbak, vbap, likp, lips, vbrk, vbrp and vbfa) to analyze your processes. Tekst only reads: it never writes to your database.

Before you start

Check the following before you connect:

  • Your data is in one schema. Tekst connects to a single schema, so keep the tables it needs together in the same one.
  • TLS (SSL) is enabled on your Postgres server. Tekst always connects encrypted and does not fall back to an unencrypted connection.
  • Tekst can reach the server over the internet on the database port. If a firewall restricts incoming traffic, allow Tekst's outbound IP addresses listed in Troubleshoot Firewall.
  • You have the Admin or Contributor role in Tekst.

Step 1: Create a read-only user

Run the following as a database administrator. Replace the placeholders with your own values.

CREATE ROLE readonly_user WITH LOGIN PASSWORD '<a strong password>';
GRANT CONNECT ON DATABASE <database> TO readonly_user;
GRANT USAGE ON SCHEMA <schema> TO readonly_user;
GRANT SELECT ON ALL TABLES IN SCHEMA <schema> TO readonly_user;

Tekst only sees tables this user can read.

Step 2: Connect in Tekst

  1. Go to Integrations and click Connect Integration.
  2. Find Postgres (category Data warehouse) and click Connect.

The Connect page filtered on the Data warehouse category, showing the Postgres card

  1. In the Connect Postgres dialog, fill in all six fields:
    • Host: your server's host name or IP address, for example db.example.com. No https:// and no port.
    • Port: 5432 is filled in.
    • Database: the database that holds your tables.
    • Schema: the schema name, exactly as in the database, for example public.
    • Username: readonly_user (or the user you created).
    • Password: that user's password.
  2. Click Connect. The button stays disabled until every field is filled in.

The Connect Postgres dialog with the Host, Port, Database, Schema, Username and Password fields

Expected result: Tekst checks that it can log in and see at least one table in the schema. The dialog closes, and the integration's configuration panel opens showing Connected. No success message appears.

Verify the connection later

Open the integration, go to the Advanced tab and click Verify connection. Tekst doesn't recheck the connection by itself, so verify again after you change the password or firewall rules.

What happens next

Tekst support reviews with you which tables Tekst loads and runs the first sync. Syncs don't run on a schedule, so the data in Tekst is as current as the last sync. Contact Tekst support for a new sync.

Change the password or user

Open the integration, go to the Settings tab and click Reconnect, then fill in all six fields again. With the same host, port, database and schema, Tekst updates the existing integration. Tell Tekst support, because their table setup is reset. A different host, port, database or schema creates a second integration.

Troubleshooting

The message appears in red at the top of the dialog. Text after "Could not connect to the database:" comes from your Postgres server.

  • "Could not connect to the database: password authentication failed for user ..." - wrong username or password.
  • "Could not connect to the database: write CONNECT_TIMEOUT ..." (after about 30 seconds) - Tekst can't reach the server, usually a firewall. Allow Tekst's outbound IPs listed in Troubleshoot Firewall.
  • "Could not connect to the database:" followed by an SSL or socket error - TLS is not enabled on the server.
  • Schema "<schema>" not found, or has no tables visible to this user - the schema name is wrong, or the user lacks USAGE or SELECT.
  • Verify connection says "Integration is not healthy - please check your credentials" - the password changed, the user was removed, or a firewall rule changed. Fix it, then Reconnect.

If you have an issue following this guide or have any other questions, please submit a request or send your question to support@tekst.com.

Was this article helpful?

0 out of 0 found this helpful

0 comments

Please sign in to leave a comment.