The LakeQL CLI reads connection details from environment variables. These are required for any command that communicates with Trino.
Required variables #
| Variable | Type | Description |
|---|---|---|
HIVE_HOST | string | Trino host URL including protocol (e.g. https://trino.example.com) |
HIVE_PORT | number | Trino port (e.g. 443) |
HIVE_USERNAME | string | Authentication username |
HIVE_PASSWORD | string | Authentication password |
HIVE_CATALOG | string | Default catalog name used when --catalog is not provided |
Optional variables #
| Variable | Type | Default | Description |
|---|---|---|---|
HIVE_SOURCE | string | — | Optional source identifier sent to Trino |
LOG_LEVEL | string | warn | Log verbosity: debug, info, warn, or error |
Example .env file #
1
2
3
4
5
6
7
8
# .env
HIVE_HOST=https://trino.example.com
HIVE_PORT=443
HIVE_USERNAME=service-account
HIVE_PASSWORD=s3cur3-p4ssw0rd
HIVE_CATALOG=hive
LOG_LEVEL=info
The CLI does not load .env automatically.
Make sure variables are present in the process environment before running commands.
You can do this in different ways:
- export variables in your shell session
-
use a wrapper like
dotenv-cli - run commands through your process manager or CI environment
Example with dotenv-cli:
1
2
dotenv -e ./.env -- lakeql-cli pull