lhc datasources
Manage Lakehousecat semantic datasources. Datasources define the database connections that the AI uses to answer analytical questions.
Commands
datasources list
lhc datasources list [--type <type>]
| Flag | Description |
|---|---|
--type | Filter by datasource type, e.g. postgresql, mysql, clickhouse |
datasources get <id>
lhc datasources get <id>
datasources create
lhc datasources create \
--name <name> \
--type <datasource-type> \
--connection-string <connection-string>
| Flag | Required | Description |
|---|---|---|
--name | yes | Datasource name |
--type | yes | Datasource type (e.g. postgresql, mysql, clickhouse) |
--connection-string | yes | Full connection URI for the database |
For the full list of supported types, see Datasource Types.
datasources update <id>
Rename a datasource:
lhc datasources update <id> --name "New Name"
datasources delete <id>
lhc datasources delete <id>
datasources search <query>
lhc datasources search "prod"
datasources statistics
lhc datasources statistics
Returns aggregate statistics across all datasources.
datasources export <id>
Export a datasource definition to a portable .lhc.json file:
# Print to stdout
lhc datasources export <id>
# Write to file
lhc datasources export <id> -f datasource.lhc.json
| Flag | Description |
|---|---|
-f, --output-file | Write output to this file (default: stdout) |
The export file can be imported into any Lakehousecat instance.
datasources import <file>
Import a datasource from a .lhc.json export file:
lhc datasources import datasource.lhc.json [--name <override-name>]
| Flag | Description |
|---|---|
--name | Override the datasource name from the export file |
If a datasource with the same name already exists, the import is aborted with an HTTP 409 error. Use --name to import under a different name, or delete the existing datasource first.