PostgreSQL

Connect RootCause.ai to your PostgreSQL database to import tables or run custom queries.


Prerequisites

Before connecting, ensure you have:

  • PostgreSQL database hostname or IP address

  • Port number (default: 5432)

  • Database name

  • Schema name (default: public)

  • Username and password with read access to the tables you want to import

  • Network access from RootCause.ai to your database (firewall rules, VPN, etc.)


Setting Up the Connection

  1. Navigate to DataDatasets in your workspace

  2. Click New Connection and select PostgreSQL

  3. Enter your connection details:

Field
Description
Example

Host

Database server hostname or IP

db.example.com

Port

PostgreSQL port

5432

Database

Database name

analytics

Schema

Schema to connect to

public

Username

Database user

readonly_user

Password

User password

••••••••

Enable SSL

Use encrypted connection

✓ Recommended

  1. Click Test Connection to verify your credentials

  2. Click Save to create the connector


Importing Data

Once your connector is saved, you can import data in two ways:

Import a Table

Select "Table" as the import type and enter the table name. RootCause.ai will import all columns and rows from that table.

Custom SQL Query

Select "Custom Query" to write your own SQL. This is useful for:

  • Joining multiple tables

  • Filtering rows before import

  • Selecting specific columns

  • Aggregating data

Example:


What Happens When You Import

  1. RootCause.ai executes your query against the database

  2. Results are stored securely in your workspace's data lake

  3. Schema is automatically detected (column names, data types)

  4. A preview is generated so you can verify the data

The imported dataset becomes available for use in Data Views and Ontology mapping.


Live Data Sync

You can configure automatic syncing to keep your dataset current:

  • Manual – Only sync when you click "Sync Now"

  • Hourly – Refresh every hour

  • Daily – Refresh once per day

  • Weekly – Refresh once per week

When a sync runs, the entire dataset is replaced with fresh data from the source.


Security Recommendations

  • Use a dedicated read-only database user for RootCause.ai

  • Enable SSL for encrypted connections

  • Restrict the user's access to only the tables needed

  • Use IP allowlisting if your database supports it


Troubleshooting

Connection timeout

  • Verify the hostname and port are correct

  • Check that your firewall allows connections from RootCause.ai

  • Ensure the database is running and accepting connections

Authentication failed

  • Verify username and password

  • Check that the user has CONNECT permission on the database

  • Ensure the user can access the specified schema

Permission denied on table

  • Grant SELECT permission to the user on the required tables

  • Verify the schema name is correct

Last updated