Datasource Configuration
Datasource configuration lives in configs/datasources.yaml and declares one or
more database connections that NL2SQL can query.
File structure
version: 1
datasources:
- id: my_postgres
description: "Primary analytics DB."
connection:
type: postgres
host: localhost
port: 5432
user: ${env:POSTGRES_USER}
password: ${env:POSTGRES_PASSWORD}
database: analytics
statement_timeout_ms: 8000
row_limit: 100
max_bytes: 10485760
Fields
version: schema version (currently1)datasources: list of datasource definitionsid: unique datasource IDdescription: optional human-readable descriptionconnection: connection detailstype: adapter type (e.g.,postgres,mysql,mssql,sqlite,duckdb)- adapter-specific fields (host, port, database, driver, etc.)
- optional limits and metadata (commonly used):
statement_timeout_msrow_limitmax_bytestags
Notes
- Use
${env:VAR}for environment variables or${provider:key}for secrets resolved viaconfigs/secrets.yaml. - Adapter-specific fields are passed through to the adapter implementation.