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. Contributing
  3. Local Development

On this page

  1. Requirements
  2. Quick Start
  3. Minitrino
    1. Commands
    2. MinIO S3 Proxy
  4. Seeding Test Data
    1. Commands
    2. Configuration
  5. Querying Trino
  6. Connection Details
  7. Default Users
  8. Troubleshooting
    1. Seed fails with "bucket does not exist"
    2. Seed fails with "401 Unauthorized"
    3. Query fails with connection error

Local Development

Set up a local Trino/MinIO environment with test data for LakeQL development.

Requirements #

  • uv — Python package manager (for minitrino)
  • Docker — container runtime
  • pnpm — Node.js package manager

Quick Start #

1
2
3
4
5
6
7
8
9
10
11
12
13
# 1. Install dependencies
uv sync
pnpm install

# 2. Start the local Trino cluster (Hive, MinIO, LDAP, OAuth2)
pnpm mt:start

# 3. Seed test data
pnpm seed --all

# 4. Verify
pnpm query "SELECT count(*) FROM hive.test.products"

Minitrino #

The local environment uses minitrino to provision a Trino cluster with all necessary modules. The minitrino library configuration is stored in .minitrino/lib/ within the project root — every developer gets the same setup.

Commands #

CommandDescription
pnpm mt:startProvision and start the cluster (inkl. MinIO proxy)
pnpm mt:restartRestart the cluster
pnpm mt:stopStop the cluster (keep volumes)
pnpm mt:cleanStop and remove everything

MinIO S3 Proxy #

Minitrino only exposes the MinIO Console (port 9001) by default. The mt:start command automatically starts a lightweight proxy that makes the S3 API available on localhost:9000 for local tooling.

Seeding Test Data #

The seed command generates Parquet files, uploads them to MinIO, and creates the corresponding Trino schemas and tables.

Commands #

CommandDescription
pnpm seed --allSeed all definitions
pnpm seed -d <name>Seed a specific definition
pnpm seed -d <name> -d <name>Seed multiple definitions
pnpm seed --all --amount 500Custom record count (default: 1000)

Each run is a full reset — existing table and data are replaced with freshly generated records.

Configuration #

Seed definitions are defined in tooling/test-data/seed.config.ts:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23import { defineSeeds } from "./src/seed/config"
import { simpleColumns, simpleGenerate } from "./src/datasets/simple"
import { complexColumns, complexGenerate } from "./src/datasets/complex"

export default defineSeeds([
  {
    name: "products",
    schema: "test",
    table: "products",
    connector: "hive",
    columns: simpleColumns,
    generate: simpleGenerate,
  },
  {
    name: "orders",
    schema: "test",
    table: "orders",
    connector: "hive",
    columns: complexColumns,
    generate: complexGenerate,
  },
])

To add a custom dataset, define columns and generate inline or create a new file under tooling/test-data/src/datasets/.

Querying Trino #

A lightweight query tool is included for quick verification:

1
2
3
4
5
6
7
8
9
# Table output (default)
pnpm query "SELECT * FROM hive.test.products LIMIT 5"

# JSON output
pnpm query "SELECT * FROM hive.test.orders LIMIT 3" -f json

# CSV output
pnpm query "SELECT count(*) FROM hive.test.products" -f csv

Connection Details #

ServiceURLCredentials
Trinohttp://localhost:8080user: admin, no password
Trino UIhttps://localhost:8443/uiadmin@minitrino.com
MinIO Consolehttp://localhost:9001access-key / secret-key
MinIO S3 APIhttp://localhost:9000 (via proxy)access-key / secret-key
The Trino UI requires https:// since the setup uses OAuth2. Make sure your browser allows bypassing the net::ERR_CERT_AUTHORITY_INVALID error.

Default Users #

The local setup uses minitrino's default users for LDAP and OAuth:

  • LDAP users
  • OAuth2 principals

Troubleshooting #

Seed fails with "bucket does not exist" #

Ensure the MinIO proxy is running. It starts automatically with pnpm mt:start, but you can restart it manually with pnpm mt:proxy.

Seed fails with "401 Unauthorized" #

Trino uses user-only auth (no password) for local development. This should work out of the box with minitrino defaults.

Query fails with connection error #

Make sure minitrino is running: pnpm mt:start

Previous page

Contributing

Next page

Contribution Guide

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