LakeQL
Introduction
  • Overview
  • Key Concepts
  • Package Map
Getting Started
  • Prerequisites
  • Quickstart
  • Environment Configuration
  • First Run
Architecture
  • System Overview
  • Data Flow
  • Request Lifecycle
Configuration
  • Environment Variables
  • Authentication
  • Trino Connection
create-app
  • Usage
  • Template Structure
  • Post Creation
Contributing
  • Local Development
  • Contribution Guide
Guides
  • Custom Resolvers
  • Extending Schema
  • Deploying
  • Mutations
  • Load Strategies
GitHub
LakeQL
  1. LakeQL
  2. Getting Started
  3. Environment Configuration

On this page

  1. Environment Variables
    1. Trino Connection
    2. API Server
    3. Authentication
    4. Runtime
  2. Example .env File
  3. Validation Behavior
  4. Docker Environment

Environment Configuration

Complete reference for all environment variables used by LakeQL packages.

Environment Variables #

LakeQL uses environment variables for configuration. All variables are validated at startup using Zod schemas via @t3-oss/env-core.

Trino Connection #

VariableTypeDefaultDescription
HIVE_HOSTstring—Trino host URL (e.g. http://localhost or https://trino.example.com)
HIVE_PORTnumber—Trino HTTP port (e.g. 8080 or 8446)
HIVE_USERNAMEstring—Username for Trino authentication
HIVE_PASSWORDstring—Password for Trino authentication
HIVE_CATALOGstring—Default Trino catalog (e.g. hive)
HIVE_SOURCEstringlakeqlValue for the X-Trino-Source header

API Server #

VariableTypeDefaultDescription
API_PORTnumber4000Port the GraphQL API server listens on
API_LOGGERenumwarnLog level: silent, debug, info, warn, error
API_MAX_RECORDS_PER_PAGEnumber2000Maximum records returned per page

Authentication #

VariableTypeDefaultDescription
AUTH_MOCKbooleanfalseEnable mock authentication for development
AUTH_MOCK_TOKENstring—Token value that grants access in mock mode

Runtime #

VariableTypeDefaultDescription
NODE_ENVenumdevelopmentEnvironment: development, production, test

Example .env File #

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20# Trino Connection
HIVE_HOST="http://localhost"
HIVE_PORT=8080
HIVE_CATALOG=hive
HIVE_USERNAME="trino"
HIVE_PASSWORD="trino-password"
HIVE_SOURCE="lakeql"

# Authentication
AUTH_MOCK=true
AUTH_MOCK_TOKEN="my-dev-token"

# API Server
API_PORT=4000
API_LOGGER="info"
API_MAX_RECORDS_PER_PAGE=500

# Runtime
NODE_ENV=development

Validation Behavior #

Environment variables are validated on startup. If a required variable is missing or has an invalid value, the server fails fast with a descriptive error message.

Validation is skipped in CI environments and during lint or test npm lifecycle events to avoid requiring full configuration for development tooling.

Docker Environment #

When running with Docker Compose (e.g. the local lakehouse stack), use a separate .env.docker file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
HIVE_HOST="http://trino"
HIVE_PORT=8080
HIVE_CATALOG=hive
HIVE_USERNAME="admin"
HIVE_PASSWORD="admin"

MINIO_ROOT_USER=admin
MINIO_ROOT_PASSWORD=password
MINIO_BUCKET=warehouse

POSTGRES_DB=metastore
POSTGRES_USER=hive
POSTGRES_PASSWORD=hive

S3_ENDPOINT=http://minio:9000
S3_REGION=eu-central-1

Previous page

Quickstart

Next page

First Run

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20