mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-13 08:15:14 +02:00
docs: document duckdb support
This commit is contained in:
parent
460c6fae63
commit
099c605dc5
11 changed files with 86 additions and 7 deletions
|
|
@ -70,6 +70,9 @@ Native database connections report `Status: ok` when the connector probe
|
|||
passes. Source connectors report connector-specific details such as Metabase
|
||||
database count, Looker user, Notion bot, or Git repo URL.
|
||||
|
||||
DuckDB connection tests open the configured file read-only. Missing files are
|
||||
reported as `File not found: <path>` and are not created.
|
||||
|
||||
```text
|
||||
Connection test passed: my-warehouse
|
||||
Driver: postgres
|
||||
|
|
|
|||
|
|
@ -100,10 +100,10 @@ runtime features are missing.
|
|||
|
||||
| Flag | Description |
|
||||
|------|-------------|
|
||||
| `--database <driver>` | Database driver to configure; repeatable. Choices: `sqlite`, `postgres`, `mysql`, `clickhouse`, `sqlserver`, `bigquery`, `snowflake` |
|
||||
| `--database <driver>` | Database driver to configure; repeatable. Choices: `sqlite`, `duckdb`, `postgres`, `mysql`, `clickhouse`, `sqlserver`, `bigquery`, `snowflake` |
|
||||
| `--database-connection-id <id>` | Existing selected connection id; repeatable |
|
||||
| `--new-database-connection-id <id>` | Connection id for one new database connection |
|
||||
| `--database-url <url>` | URL, `env:NAME`, or `file:/path` for one new URL-style database connection; also used as the SQLite path |
|
||||
| `--database-url <url>` | URL, `env:NAME`, or `file:/path` for one new URL-style database connection; also used as the SQLite or DuckDB path |
|
||||
| `--database-schema <schema>` | Database schema or dataset to include; repeatable |
|
||||
| `--skip-databases` | Leave database setup incomplete |
|
||||
|
||||
|
|
@ -111,6 +111,10 @@ KTX needs at least one database connection before it can build database
|
|||
context. Use `--skip-databases` only when intentionally leaving the project
|
||||
incomplete.
|
||||
|
||||
```bash
|
||||
ktx setup --new --database duckdb --new-database-connection-id warehouse --database-url ./data/warehouse.duckdb
|
||||
```
|
||||
|
||||
### Query History
|
||||
|
||||
| Flag | Description |
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@ Quote SQL in shell scripts and when the query contains spaces or punctuation.
|
|||
# Count rows in a table
|
||||
ktx sql --connection warehouse "select count(*) from public.orders"
|
||||
|
||||
# Count rows in a DuckDB table
|
||||
ktx sql --connection warehouse "select count(*) as rows from orders"
|
||||
|
||||
# Return a small result set
|
||||
ktx sql \
|
||||
--connection warehouse \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue