LakeQL
Overview
  • Installation
Commands
  • init
  • pull
  • create-registry
  • list-schemas
  • list-tables
  • list-views
  • list-columns
  • create-endpoint
  • generate-import-config
Configuration
  • Environment Variables
  • Config File
GitHub
LakeQL
  1. CLI
  2. Configuration
  3. Config File

On this page

  1. Supported formats
  2. Configuration
  3. Path resolution
  4. Examples
    1. MJS (recommended)
    2. JSON

Config File

Reference for the lakeql config file.

The lakeql config file controls where the CLI places generated code. It is created by running lakeql-cli init.

Supported formats #

The CLI supports multiple config file formats, loaded in the following precedence order (first match wins):

  1. lakeql.config.mjs (recommended)
  2. lakeql.config.ts
  3. lakeql.config.js
  4. lakeql.config.json

Config loading is powered by c12.

Configuration #

PropertyType
sourcePathstring

Base path for code generation (schemas, config-registry, etc.). Relative paths are resolved from the project root (where the config file lives).

Default: "."

Path resolution #

  • Relative paths are resolved from the directory where the config file lives.
  • If src/ is detected during lakeql-cli init , sourcePath is set to "src" automatically.
  • The CLI --source-path flag overrides the config value for that invocation.

Examples #

MJS (recommended) #

1
2
3
4
5
6
7
// lakeql.config.mjs

/** @type {import('@lakeql/cli').LakeQLConfig} */
export default {
  sourcePath: "src",
}

JSON #

1
2
3
4
{
  "sourcePath": "src"
}

With either config, running lakeql-cli pull places generated files under src/schemas/generated/{catalog}/{schema}/{table}/.

Previous page

Environment Variables