Connecting to PostgreSQL

Ridge delivers AI-enabled embedded analytics and data agents so product teams can build quickly, prove value, and win the customer.

Time to read
5 min read
|
For Database Admins
|
Relational database
OVERVIEW

How Ridge works with PostgreSQL

What you can do

  • Connect to a PostgreSQL database and read its tables
  • Reference a table directly, or shape it with a custom SQL query
  • Send data over a private VPC instead of exposing the database publicly
  • Refresh on a schedule with standard cron expressions
Gather credentials

What you'll need

A few connection details link Ridge to your database. Collect these before you start.

Connect in Ridge

Set up the connection

1 Create a Connection

On the Data page, click New Connection and choose PostgreSQL as the type. Enter the credentials you gathered, then save.

  • Host and Port — your server address
  • Database — the database name
  • Username and Password — a read-only role

2 Create a Dataset

Back on the Data page, click New, select source Connection, and pick the PostgreSQL connection you just created. A Data Set points at a specific table and can carry its own query and refresh schedule.

3 Select a table, or write a query

Choose how Ridge reads from the database. A direct table reference is simplest; custom SQL lets you filter and aggregate at the source.

4 Schedule ingestion

Set an ingestion schedule with standard cron syntax, then save. Ridge runs your query against PostgreSQL and stores the results, ready for analysis.

Recommendations

Best practices

A few habits keep ingestion secure and refreshes efficient.

Reference

Supported features & limitations

Help

Troubleshooting

Most connection issues fall into four buckets. Expand the one that matches your error.

Invalid credentials

"password authentication failed", "no password supplied", "role … does not exist"

Your username, password, or role is wrong. Re-enter the credentials and confirm the role exists.

Insufficient permissions

"permission denied", "must be owner", "insufficient privilege"

The role lacks rights. Grant it SELECT on the target table or schema.

Resource not found

database/relation/schema "does not exist", or DuckDB "Catalog Error: Table … does not exist"

The database or table name is wrong. Fix the identifier.

Network unreachable

"could not translate host name", "could not connect to server", "connection refused", "timed out", "no route to host"

The host or port is unreachable. Check the host/port and your egress allowlist.