Skip to main content
Version: 0.0.41

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>]
FlagDescription
--typeFilter 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>
FlagRequiredDescription
--nameyesDatasource name
--typeyesDatasource type (e.g. postgresql, mysql, clickhouse)
--connection-stringyesFull 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
FlagDescription
-f, --output-fileWrite 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>]
FlagDescription
--nameOverride 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.