Database Providers¶
SQLatte supports four database providers, selected via database.provider. Only the block for the selected provider needs to be filled in.
Trino¶
Distributed SQL engine over Hive, Iceberg, Delta Lake, and other catalogs.
database:
provider: "trino"
trino:
host: "trino.example.com"
port: 443
user: "username"
password: "password"
catalog: "hive"
schema: "default"
http_scheme: "https"
timeout: 300 # optional, seconds — see Query Timeouts below
PostgreSQL¶
database:
provider: "postgresql"
postgresql:
host: "localhost"
port: 5432
database: "analytics"
user: "postgres"
password: "password"
schema: "public"
min_connections: 1
max_connections: 10
timeout: 300 # optional, seconds — see Query Timeouts below
min_connections/max_connections size the connection pool.
MySQL¶
database:
provider: "mysql"
mysql:
host: "localhost"
port: 3306
database: "analytics"
user: "root"
password: "password"
autocommit: true
timeout: 300 # optional, seconds — see Query Timeouts below
BigQuery¶
database:
provider: "bigquery"
bigquery:
project_id: "my-gcp-project"
dataset: "analytics"
location: "US"
credentials_path: "/path/to/service-account.json"
# or inline for containers: credentials_json: '{"type": "service_account", ...}'
timeout: 300
max_results: 10000
price_per_tb_usd: 6.25 # optional — adds a $ estimate to the confirm-before-execute prompt
Requires a service account with BigQuery Data Viewer and BigQuery Job User roles at minimum. This is a separate credential path from ops_agent.config.projects[].credentials_path, which powers the BigQuery Ops Console — the two can point at different service accounts with different permission scopes if you want query access and ops/cost-analysis access separated.
Query Timeouts¶
Every provider enforces an optional timeout (seconds, default 300 = 5 minutes) on execute_query(). A query still running past that limit is cancelled server-side instead of being left to run unbounded — this protects the warehouse from a runaway MCP/LLM-generated query, not just a slow client:
| Provider | Cancellation mechanism |
|---|---|
| Trino | cursor.cancel() → a DELETE to the Trino coordinator |
| PostgreSQL | conn.cancel() (psycopg2's real PQcancel) |
| MySQL | No native client-side cancel — a throwaway second connection runs KILL QUERY <connection_id> |
| BigQuery | Job cancellation via the BigQuery client |
All four raise TimeoutError to the caller on abort. This applies to every path that calls execute_query — /query, /auth/query, dashboards, scheduled queries, and MCP tool calls alike.
Multi-Tenant Overrides¶
If plugins.auth is enabled, each authenticated user connects with their own credentials passed at login time rather than the server's static database block — see Security Overview. The top-level database config still applies to the default (unauthenticated) chat UI and widget.
| Database | Status | Required fields |
|---|---|---|
| Trino | Stable | host, port, catalog, schema |
| PostgreSQL | Stable | host, port, database, schema |
| MySQL | Stable | host, port, database |
| BigQuery | Stable | project_id, credentials |