Source: https://gitlab-test-org.docs.pageloop.ai/fyno-connect-postgres

# Postgres

Connect your PostgreSQL database to Fyno Connect with a connection URI. Once connected, you can build cohorts directly from the data in your database.

## Connect your PostgreSQL database

1. **Open Postgres from Databases**

   Go to **Databases** and click **Postgres**. The **Add a PostgreSQL database** pop-up opens.
2. **Enter the connection details**

   Fill in the following fields:
   - **Custom Name**: A name to identify this connection in Fyno Connect.
   - **PostgreSQL URI**: Paste your PostgreSQL connection string. The value is masked by default. Click the eye icon to view it.
   ![Add a PostgreSQL database pop-up](assets/fyno-connect-postgres-add-database.png)
3. **Add the database**

   Click **Add Database**. Fyno tests the connection and saves it once the test succeeds. The database then appears under **Connected DBs** on the same page.
4. **Create cohorts**

   You can now create cohorts from the data in your database. See [Create Cohorts](./how-to-create-a-cohort-in-fyno-connect).

## Connection string format

> [!TIP]
>
> **Check your connection string**
>
> If the connection test fails, make sure your connection string follows the standard format:
>
> ```
> postgresql://[user[:password]@][host][:port][/dbname][?param1=value1&...]
> ```
