Skip to main content

Setup

Step 1: Create a dedicated database user

Connect to your PostgreSQL database and create a service account for ClarityQ:
-- Create the ClarityQ user
CREATE USER clarityq_user WITH PASSWORD 'your_secure_password';

-- Grant database connection privilege
GRANT CONNECT ON DATABASE your_database TO clarityq_user;

Step 2: Configure schema and table permissions

Grant the necessary permissions for ClarityQ to discover schemas, query data, and perform analytics:
-- Grant schema usage for data schemas
GRANT USAGE ON SCHEMA public TO clarityq_user;
GRANT USAGE ON SCHEMA your_schema TO clarityq_user;

-- Grant schema access for metadata discovery
GRANT USAGE ON SCHEMA information_schema TO clarityq_user;
GRANT USAGE ON SCHEMA pg_catalog TO clarityq_user;

-- Grant SELECT on existing tables for data querying
GRANT SELECT ON ALL TABLES IN SCHEMA public TO clarityq_user;
GRANT SELECT ON ALL TABLES IN SCHEMA your_schema TO clarityq_user;

-- Grant SELECT on system tables for schema introspection
GRANT SELECT ON ALL TABLES IN SCHEMA information_schema TO clarityq_user;
GRANT SELECT ON ALL TABLES IN SCHEMA pg_catalog TO clarityq_user;


-- Grant access to views for complete schema discovery
GRANT SELECT ON ALL TABLES IN SCHEMA information_schema TO clarityq_user;

Step 3: Configure network access

Ensure your PostgreSQL database allows connections from the following ClarityQ IP addresses:
  • 44.218.213.75
  • 54.161.37.107
  • 54.208.212.67
Configure your firewall, security groups, or database access rules to allow inbound connections from these IPs on port 5432.

Step 5: Add connection in ClarityQ

In the ClarityQ interface, fill out the connection form with the following fields:
  • Connection Name: Choose a name for this connection (e.g., “Production PostgreSQL”)
  • Host: Your PostgreSQL server hostname or IP address (e.g., db.example.com)
  • Port: 5432 (default, pre-filled)
  • Database: Your database name (e.g., analytics_db)
  • User: clarityq_user (the user you created in Step 1)
  • Password: The password you set for clarityq_user

Connection parameters reference

Required parameters

ParameterTypeDescriptionExample
connection_namestringUnique identifier for this connectionProduction DB
hoststringDatabase server hostname or IP addressdb.example.com
databasestringTarget database nameanalytics_db
userstringPostgreSQL usernameclarityq_user
passwordstringUser passwordsecure_password

Optional parameters

ParameterTypeDefaultDescription
portnumber5432PostgreSQL server port
schemastringpublicDefault schema