Crates.io | bendsql |
lib.rs | bendsql |
version | |
source | src |
created_at | 2023-04-01 04:50:18.42058 |
updated_at | 2024-12-06 03:23:09.256824 |
description | Databend Native Command Line Tool |
homepage | |
repository | https://github.com/databendlabs/bendsql |
max_upload_size | |
id | 827081 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Databend Native Command Line Tool
cargo install bendsql
❯ bendsql --help
Databend Native Command Line Tool
Usage: bendsql [OPTIONS]
Options:
--help Print help information
--flight Using flight sql protocol
--tls Enable TLS
-h, --host <HOST> Databend Server host, Default: 127.0.0.1
-P, --port <PORT> Databend Server port, Default: 8000
-u, --user <USER> Default: root
-p, --password <PASSWORD> [env: BENDSQL_PASSWORD=]
-D, --database <DATABASE> Database name
--set <SET> Settings
--dsn <DSN> Data source name [env: BENDSQL_DSN=]
-n, --non-interactive Force non-interactive mode
-q, --query <QUERY> Query to execute
-d, --data <DATA> Data to load, @file or @- for stdin
-f, --format <FORMAT> Data format to load [default: csv]
-o, --output <OUTPUT> Output format [default: table]
--progress Show progress for data loading in stderr
-V, --version Print version
❯ bendsql
Welcome to BendSQL.
Connecting to localhost:8000 as user root.
bendsql> select avg(number) from numbers(10);
SELECT
avg(number)
FROM
numbers(10);
┌───────────────────┐
│ avg(number) │
│ Nullable(Float64) │
├───────────────────┤
│ 4.5 │
└───────────────────┘
1 row in 0.259 sec. Processed 10 rows, 10B (38.59 rows/s, 308B/s)
bendsql> show tables like 'd%';
SHOW TABLES LIKE 'd%';
┌───────────────────┐
│ tables_in_default │
│ String │
├───────────────────┤
│ data │
│ data2 │
│ data3 │
│ data4 │
└───────────────────┘
4 rows in 0.106 sec. Processed 0 rows, 0B (0 rows/s, 0B/s)
bendsql> exit
Bye
❯ echo "select number from numbers(3)" | bendsql -h localhost --port 8900 --flight
0
1
2
create stage s_temp;
put fs:///tmp/a*.txt @s_temp/abc;