Wobby Docs
HomepageSign inCreate account
  • 🎊Welcome to Wobby
  • quick start
    • Access Wobby
    • Recruiting your first AI analyst
  • Agent
    • Creating an Agent
      • Link data sources to an Agent
      • Agent Instructions
      • Choose an LLM
    • Asking the Agent questions
      • How to ask data questions
  • data sources
    • Connect a data source
      • CSV files
      • PostgreSQL
      • MySQL
      • Snowflake
      • BigQuery
      • Microsoft SQL Server (MS SQL)
      • MariaDB
    • Metadata
  • Query templates
    • Quick Overview
    • Creation & Approval
    • How Agents Use Query Templates
  • Integrations
    • Slack
    • Teams
  • SECURITY & privacy
    • How Wobby protects your data
Powered by GitBook
On this page
  • Connect PostgreSQL to Wobby
  • 1. Create Role and User in PostgreSQL
  • 2. Optional: Auto-Grant Future Access
  • 3. Allow Wobby’s IP Address
  • 4. Set Up the Connection in Wobby

Was this helpful?

  1. data sources
  2. Connect a data source

PostgreSQL

Connect a PostgreSQL Database

Connect PostgreSQL to Wobby

To connect your PostgreSQL database to Wobby, follow these steps:

  1. Create a login role and user in your database.

  2. Grant read-only permissions.

  3. Allow Wobby’s IP address through your firewall or security rules.

  4. Set up the connection in the Wobby interface.

⚠️ Wobby’s agents only run read-only queries on your data. Write permissions are never used.


1. Create Role and User in PostgreSQL

In PostgreSQL, roles can act as both login accounts and permission holders. The following SQL sets up a login with read-only access for Wobby:

-- Replace placeholder values with your actual schema and secure password

-- Create login role
CREATE ROLE wobby_login WITH LOGIN PASSWORD '<your_secure_password>';

-- Grant connection and usage privileges on the database
GRANT CONNECT ON DATABASE your_database_name TO wobby_login;

-- Grant usage on schema
GRANT USAGE ON SCHEMA your_schema_name TO wobby_login;

-- Grant read-only access to existing tables
GRANT SELECT ON ALL TABLES IN SCHEMA your_schema_name TO wobby_login;

-- Grant read-only access to existing views
GRANT SELECT ON ALL SEQUENCES IN SCHEMA your_schema_name TO wobby_login;

âś… This setup gives Wobby read access to the specified schema.


2. Optional: Auto-Grant Future Access

PostgreSQL supports default privileges, so you can configure it to automatically grant access to new tables and views:

-- Make sure this is run by a role that owns the schema
ALTER DEFAULT PRIVILEGES IN SCHEMA your_schema_name
GRANT SELECT ON TABLES TO wobby_login;

🔄 This ensures Wobby gets access to future tables without needing manual grants.


3. Allow Wobby’s IP Address

If your PostgreSQL server is protected by firewall or network rules, allow inbound traffic from Wobby’s static IP:

34.77.172.158

This is required for Wobby’s agents to connect.


4. Set Up the Connection in Wobby

  1. Go to Wobby → Data Sources.

  2. Click New PostgreSQL Connection.

  3. Fill in the following details:

    • Host: your PostgreSQL server address

    • Port: typically 5432

    • Database name: the one where wobby_login has access

    • Username: wobby_login

    • Password: the password you defined earlier

  4. Test the connection and save.


PreviousCSV filesNextMySQL

Last updated 22 days ago

Was this helpful?