Connect a Database
The steps below apply to PostgreSQL and MySQL. BigQuery and Snowflake have additional OAuth steps described in their individual guides.
Open the connection wizard
Settings → Connections → New Connection and pick your database type.Enter connection details
Allowlist Dashport IPs
52.14.210.5, 18.221.4.33, 3.143.171.87.Test and save
Select a Table or Write Custom SQL
Once your database is connected, Dashport gives you two ways to define the data for each widget:
Select a Table
Browse and choose any table or view in your database. Dashport handles aggregations, filters, and grouping through the widget editor's point-and-click UI. Great for quick exploration.
Write a Custom SQL Query
Write your own SELECT statement and Dashport treats the result as the data source. Your query is the report — all joins, aggregations, and filters are already baked in.
In business intelligence, a custom SQL query is your report. If you already know the exact data you need, write the query, connect it, and go straight to Superdashboard — no need to use Dashport Chat at all. This is the fastest path from database to chart.
Example Custom SQL Query
-- Monthly revenue by product category — report-ready, no further transformation needed
SELECT
DATE_TRUNC('month', o.order_date) AS month,
p.category AS category,
SUM(oi.quantity * oi.unit_price) AS revenue,
COUNT(DISTINCT o.id) AS order_count,
ROUND(AVG(oi.unit_price), 2) AS avg_order_value
FROM orders o
JOIN order_items oi ON oi.order_id = o.id
JOIN products p ON p.id = oi.product_id
WHERE o.order_date >= NOW() - INTERVAL '12 months'
AND o.status = 'completed'
GROUP BY 1, 2
ORDER BY 1 DESC, 3 DESC;Creating a read-only user (PostgreSQL)
-- Create a dedicated read-only role
CREATE ROLE dashport_readonly WITH LOGIN PASSWORD 'replace_with_strong_password';
-- Grant connection access to your database
GRANT CONNECT ON DATABASE your_database TO dashport_readonly;
-- Grant usage on the target schema
GRANT USAGE ON SCHEMA public TO dashport_readonly;
-- Grant SELECT on all existing tables
GRANT SELECT ON ALL TABLES IN SCHEMA public TO dashport_readonly;
-- Grant SELECT on future tables automatically
ALTER DEFAULT PRIVILEGES IN SCHEMA public
GRANT SELECT ON TABLES TO dashport_readonly;