A scaffolded project reads its connection details from environment variables. The lakeql.config.ts file references them. Copy the generated .env.example to .env and fill in your data source details:
1
2
cp .env.example .env
1
2
3
4
5
6
7
# .env — example for a Trino data source
TRINO_HOST=https://trino.example.com
TRINO_PORT=8080
TRINO_CATALOG=hive
TRINO_USERNAME=svc
TRINO_PASSWORD=...
The config reads these through a typed env object. This catches a missing or malformed value early, instead of failing mid-request.
1
2
3
4
5
6
7
8
// lakeql.config.ts (excerpt)
connection: {
host: env.TRINO_HOST,
port: env.TRINO_PORT,
catalog: env.TRINO_CATALOG,
auth: { type: "basic", username: env.TRINO_USERNAME, password: env.TRINO_PASSWORD },
}
Loading the Env File #
The server loads the env file on start. The generated dev script passes it to Node. The CLI loads it when you pass --env:
pnpm lakeql-cli pull --env .envKeep
.env out of version control, because it holds credentials. The
scaffolded project gitignores it by default.For the full configuration surface, see Configuration.