Documentation
GuidesConnections

Connect to Postgres

Create a Postgres connection with username and password secrets, choose its TLS mode and schemas, and add an optional staging schema.

This page explains how to connect a Postgres database to Bobsled AI. A Postgres connection uses a host, port, database, optional schema filters, and named secrets for both username and password. For the steps that every provider shares, see Create and manage connections.

Before you begin

  • Get the role that creates connections.
  • Make sure that the host resolves only to public IP addresses. Bobsled AI refuses a Postgres host that resolves to a private address.
  • Create named secrets for the username and the password.
  • Optional: To join uploaded CSV data with Postgres queries, create a staging schema in the configured database.

Required permissions

For a staging schema, grant the connection user the following permissions:

  • USAGE and CREATE on the schema.
  • Permission to read and delete its own staging tables.

Create a Postgres connection

To create a Postgres connection, do the following:

  1. On the Connections page, click Add connection, and then select Postgres.
  2. Enter a Display name.
  3. Enter the Host, Port, and Database.
  4. In TLS mode, select a mode. For more information, see TLS modes.
  5. Select the Username secret and the Password secret.
  6. In Data scope, enter the Default schema.
  7. Optional: Enter Included schemas and Excluded schemas.
  8. Optional: Enter a Staging schema. Leave it blank to use the existing execution path.
  9. Click Save connection. Bobsled AI tests the connection.

With a staging schema, Test connection also creates a probe table in it, writes and reads one row, and drops the table. If the test fails, see Troubleshoot a failed test.

TLS modes

TLS mode has the following options:

  • Verify CA and hostname: Encrypts the connection and verifies the server certificate and hostname. Select it if the provider supports full certificate verification.
  • Require encryption: Encrypts the connection without verifying the certificate or hostname.

Don't weaken TLS only to make a test pass. Correct the trust or endpoint configuration instead.

What's next

On this page