generate-import-config writes an import.config.mjs from the schemas already generated under your source path. This file is a bulk-pull config for the CLI. It enumerates the generated endpoints so pull --bulk can regenerate them in one run. The API server does not read it. The server discovers schemas by globbing the generated query-schema/mutation-schema files under its schema path.
pnpm lakeql-cli generate-import-configRun this after pull has generated one or more endpoints. The file is written as import.config.mjs in the directory you run the command from. Use --output to write elsewhere, or --force to overwrite an existing file.
Generated shape #
Each generated endpoint has a config.ts that exports the authoritative sourceConfig (dataSource, adapter, catalog, schema, tableName). generate-import-config reads those values directly — it does not infer them from the directory layout. Endpoints are grouped by dataSource, catalog, and schema, with every tableName collected into tables:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/** @type {import('@lakeql/cli').BulkPullConfig} */
export default [
{
dataSource: "trino",
catalog: "hive",
schema: "tier1_open_lake",
tables: ["itaps_v2_environments_latest"],
},
{
dataSource: "fabric",
catalog: "fabric",
schema: "Processed_LH",
tables: ["tier1_open_lake"],
},
]
Each entry carries a dataSource so a multi-source project can attribute every entry to the source it came from. The adapter is not emitted — it is derivable from the dataSource (the source's config in lakeql.config.ts knows its adapter).
--source-path <path>
Base path for generated code (resolved from the command invocation directory). Files are created in schemas/generated|custom inside this path.
| Property | Value |
|---|---|
| Type | string |
| Required | No |
| Default | command invocation directory |
--output <path>
Output file path for the generated config
| Property | Value |
|---|---|
| Type | string |
| Required | No |
| Default | "/vercel/path0/apps/docs/import.config.mjs" |
--force
Overwrite existing config without confirmation
| Property | Value |
|---|---|
| Type | boolean |
| Required | No |
| Default | false |