Skip to content
Monda Help Center home
Monda Help Center home

Postgres Database Source

In order to setup Postgres as a data source, you need admin access to a PostgreSQL database.

Creating a "read-only" user

  1. Use a PostgreSQL client or connect via terminal.

  2. Create a ”read-only” user. Replace monda_reader and secure_password with your preferred username and password:

    CREATE USER monda_reader WITH PASSWORD 'secure_password';
  3. Grant access to the required database and schema. Replace your_schema_name with the schema you want to expose:

    GRANT CONNECT ON DATABASE your_database TO monda_reader; \c your_database GRANT USAGE ON SCHEMA your_schema_name TO monda_reader; GRANT SELECT ON ALL TABLES IN SCHEMA your_schema_name TO monda_reader;
  4. Optional but recommended: Ensure future tables are accessible. This allows the “read-only” user to access newly added tables automatically:

    ALTER DEFAULT PRIVILEGES IN SCHEMA your_schema_name GRANT SELECT ON TABLES TO monda_reader;

Connect PostgreSQL to Monda

  1. In your Provider Portal, go to Onboard > Sources > Add Connection.

  2. Select Postgres Database from the dropdown menu.

    • Admins must provide the following information:

      • Host: the hostname or IP of your PostgreSQL instance

      • Port: typically 5432 unless configured otherwise

      • Database: the name of your PostgreSQL database

      • User: the read-only username (e.g. monda_reader)

      • Password: the corresponding password

  3. Click Create. After the connection is established, you can test it via the Test Connection button.

    Postgres Database setup source.gif
    Postgres database setup example.png