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. Commands
  3. generate-import-config

On this page

  1. Syntax
  2. Usage
    1. Overwriting an existing file
    2. Custom output path
  3. How it works
  4. Options
    1. --source-path <path>
    2. --output <path>
    3. --force

generate-import-config

Generate an import.config.mjs from already-pulled schemas.

Scans the schemas/generated/ directory and generates a ready-to-use import.config.mjs for the pull --bulk command.

This is useful when you have already pulled a set of schemas and want to re-use them as a bulk config — without having to maintain the file by hand.

Syntax #

1
2
lakeql-cli generate-import-config [options]

Usage #

1
2
lakeql-cli generate-import-config

If the output file does not exist yet, the command writes it directly:

1
2
Written to "/my-project/import.config.mjs".

Overwriting an existing file #

If the output file already exists, the command warns and prompts for confirmation before overwriting:

Use --force to skip the prompt entirely:

1
2
lakeql-cli generate-import-config --force

Custom output path #

1
2
lakeql-cli generate-import-config --output ./config/bulk.mjs

How it works #

The command reads your lakeql.config config file to determine the base path for generated files (same as all other commands). The --source-path flag overrides the config value if needed.

It then scans the directory structure under schemas/generated/:

1
2
3
4
5
schemas/generated/
└── <catalog>/
    └── <schema>/
        └── <table>/       ← each subdirectory becomes a table entry

Each catalog/schema combination becomes one entry in the generated config. Schemas that contain no table subdirectories are silently skipped.

Options #

--source-path <path>

Base path for generated code (resolved from the command invocation directory). Files are created in `schemas/generated|custom` inside this path.

PropertyValue
Typestring
RequiredNo
Defaultcommand invocation directory

--output <path>

Output file path for the generated config

PropertyValue
Typestring
RequiredNo
Default"/vercel/path0/apps/docs/import.config.mjs"

--force

Overwrite existing config without confirmation

PropertyValue
Typeboolean
RequiredNo
Defaultfalse

Previous page

create-endpoint

Next page

Configuration