mirror of
https://github.com/Canner/WrenAI.git
synced 2026-08-30 18:00:36 +08:00
5be12a5fb5
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.0 KiB
2.0 KiB
Connection formats
The connection_info.json file (or --connection-info / --connection-file flags) requires a datasource field plus the connector-specific fields below.
Accepted formats
Flat format — all fields at the top level:
{
"datasource": "postgres",
"host": "localhost",
"port": 5432,
"database": "mydb",
"user": "postgres",
"password": "secret"
}
Envelope format — connector fields nested under properties (used by MCP server and Wren web):
{
"datasource": "postgres",
"properties": {
"host": "localhost",
"port": 5432,
"database": "mydb",
"user": "postgres",
"password": "secret"
}
}
Both formats are accepted. The CLI auto-flattens the envelope format.
Per-connector fields
MySQL
{
"datasource": "mysql",
"host": "localhost",
"port": 3306,
"database": "mydb",
"user": "root",
"password": "secret"
}
PostgreSQL
{
"datasource": "postgres",
"host": "localhost",
"port": 5432,
"database": "mydb",
"user": "postgres",
"password": "secret"
}
BigQuery
{
"datasource": "bigquery",
"project_id": "my-gcp-project",
"dataset_id": "my_dataset",
"credentials": "<base64-encoded-service-account-json>"
}
Snowflake
{
"datasource": "snowflake",
"user": "myuser",
"password": "secret",
"account": "myorg-myaccount",
"database": "MYDB",
"schema": "PUBLIC"
}
Redshift (standard)
{
"datasource": "redshift",
"host": "my-cluster.xxxx.us-east-1.redshift.amazonaws.com",
"port": 5439,
"database": "dev",
"user": "awsuser",
"password": "secret"
}
Redshift (IAM)
{
"datasource": "redshift",
"redshift_type": "redshift_iam",
"cluster_identifier": "my-cluster",
"database": "dev",
"user": "awsuser",
"region": "us-east-1",
"access_key_id": "AKIA...",
"access_key_secret": "secret"
}
DuckDB (local files)
{
"datasource": "duckdb",
"url": "/path/to/data",
"format": "parquet"
}