Connecting Databases
Connecting Databases
datarelix.ai supports nine database dialects plus direct file/object-storage querying (DuckDB). Each has its own auth modes, scope conventions, and setup steps. Click an auth mode below to jump directly to its setup guide.
Supported dialects
| Dialect | Query language | Default scope | Auth modes |
|---|---|---|---|
| Postgres | SQL | public schema | Username & password · Connection string |
| MySQL | SQL | connected database | Username & password · Connection string |
| Azure SQL / Synapse | T-SQL | dbo schema | Username & password · Connection string · Entra OBO · Service principal — secret · Service principal — certificate |
| Databricks | Spark SQL | default schema | Personal Access Token · OAuth M2M · Federated JWT |
| Kusto (Azure Data Explorer) | KQL | configured database | Entra OBO · App + Certificate |
| BigQuery | GoogleSQL | pick a dataset | Service account JSON · OAuth |
| Athena | Trino/Presto SQL | pick a Glue database | IAM access keys · Assume Role |
| Elasticsearch | ES|QL (8.11+) | pick allowed indices | API key · Basic auth |
| Snowflake | SQL | configured schema | Username & password |
| Files & Object Storage (DuckDB) | DuckDB SQL | configured datasets | AWS S3 · Azure Blob/ADLS · Google Cloud Storage · Direct HTTPS |
Common fields
Every connection has these:
- Name — your label for this connection.
- Dialect — pick one of the nine.
- Allowed scope — datarelix.ai only introspects and queries within this scope. The label changes per dialect (schema / database / dataset / index pattern), but the meaning is the same: a hard boundary around what the planner and query service can see.
Dialect-specific fields appear after you pick a dialect. See each per-dialect guide for details.
After you connect
datarelix.ai kicks off schema discovery — introspecting the schema and optionally using an LLM to enrich tables with descriptions. You can skip the LLM step and use raw introspection only.
Before analysis starts, you can add optional context: what the database contains, which tables matter most, which columns act as business keys. These notes are sent with schema metadata only; row data is never sent to the LLM.
Discovery uses this precedence for planner metadata:
- Database introspection — tables, columns, types, and declared PK/FK constraints.
- LLM enrichment — descriptions, inferred relationships, and primary-key hints for tables with no declared PK.
- User overrides — PK/FK toggles saved from the schema review UI.
User PK/FK changes only affect planning context. They do not alter your database and do not rewrite the raw introspection snapshot.
Re-run discovery any time you add columns, tables, or change descriptions. Discovery is idempotent.
Universal troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Connection refused | Network reachability | Whitelist datarelix.ai’s egress IPs in your database firewall. |
Authentication failed | Wrong credentials | Test with the dialect’s native CLI or console first. |
| Empty schema | Wrong scope | Check Allowed scope — see the per-dialect guide for what blank means. |
| Discovery hangs | LLM enrichment timeout on a large schema | Use raw introspection without the LLM step, or narrow the allowed scope. |
For API-level error codes, see Error Codes.