Crates.io | kapot-cli |
lib.rs | kapot-cli |
version | 0.2.1 |
created_at | 2025-01-31 14:43:39.418178+00 |
updated_at | 2025-02-03 14:56:17.515224+00 |
description | Command Line Client for Kapôt distributed query engine. |
homepage | https://github.com/neurono-ml/kapot |
repository | https://github.com/neurono-ml/kapot |
max_upload_size | |
id | 1537576 |
size | 171,703 |
kapot is a distributed query execution framework, written in Rust, that uses Apache Arrow as its in-memory format.
The kapot CLI allows SQL queries to be executed by an in-process DataFusion context, or by a distributed kapot context.
USAGE:
kapot-cli [OPTIONS]
OPTIONS:
-c, --batch-size <BATCH_SIZE>
The batch size of each query, or use kapot default
--color
Enables console syntax highlighting
--concurrent-tasks <CONCURRENT_TASKS>
The max concurrent tasks, only for kapot local mode. Default: all available cores
-f, --file <FILE>...
Execute commands from file(s), then exit
--format <FORMAT>
[default: table] [possible values: csv, tsv, table, json, nd-json, automatic]
-h, --help
Print help information
--host <HOST>
kapot scheduler host
-p, --data-path <DATA_PATH>
Path to your data, default to current directory
--port <PORT>
kapot scheduler port
-q, --quiet
Reduce printing other than the results and work quietly
-r, --rc <RC>...
Run the provided files on startup instead of ~/.kapotrc
-V, --version
Print version information
Create a CSV file to query.
$ echo "1,2" > data.csv
$ kapot-cli
kapot CLI v0.12.0
> CREATE EXTERNAL TABLE foo (a INT, b INT) STORED AS CSV LOCATION 'data.csv';
0 rows in set. Query took 0.001 seconds.
> SELECT * FROM foo;
+---+---+
| a | b |
+---+---+
| 1 | 2 |
+---+---+
1 row in set. Query took 0.017 seconds.
> \q
If you want to execute the SQL in kapot by kapot-cli
, you must build/compile kapot-cli
first.
cd arrow-kapot/kapot-cli
cargo build
cargo install --path .
The kapot CLI can connect to a kapot scheduler for query execution.
kapot-cli --host localhost --port 50050