Skip to content

Commit 3b60c4d

Browse files
authored
enhance proton client page (#623)
1 parent ebc6ddf commit 3b60c4d

1 file changed

Lines changed: 34 additions & 3 deletions

File tree

docs/proton-client.md

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,40 @@
11
# proton-client
22

3-
Timeplus Proton provides a native command-line client: `proton-client` to run SQL commands. You can also launch the client via `proton client`.
3+
`proton client` is the native CLI for [Timeplus Proton](/proton), shipped in
4+
the single `proton` binary. The alias `proton-client` forwards to
5+
`proton client`.
46

5-
For detailed usage of the SQL client, please check [timeplusd-client](/timeplusd-client), since the SQL clients in Timeplus Proton and Timeplus Enterprise share the same flags and configurations.
7+
The CLI shares its flags, configuration, and I/O formats with
8+
[`timeplusd-client`](/timeplusd-client) — see that page for usage, parameterized
9+
queries, and loading/dumping data. Substitute `proton client` for
10+
`timeplusd client` in any example.
611

712
:::tip
8-
However, please use `proton-client` to connect to Timeplus Proton and use `timeplusd-client` to connect to the `timeplusd` in Timeplus Enterprise. Otherwise certain features won't be available and may not work. For example, when you run `proton-client` to connect to a Timeplus Enterprise deployment and try to create a [mutable stream](/mutable-stream), the `proton-client` won't accept the `CREATE MUTABLE STREAM` SQL at the client side.
13+
Connect to Timeplus Proton with `proton-client` and to `timeplusd` in Timeplus
14+
Enterprise with `timeplusd-client`. Mixing them works for basic queries but
15+
hides Enterprise-only features — for example, `proton-client` rejects
16+
`CREATE MUTABLE STREAM` on a [mutable stream](/mutable-stream) at the client
17+
side before the request reaches the server.
918
:::
19+
20+
## Proton-specific defaults
21+
22+
- **History file:** `~/.proton-client-history`
23+
- **Config files** (first match wins): `--config-file` path → `./proton-client.xml``~/.proton-client/config.xml``/etc/proton-client/config.xml`
24+
- **Native TCP port:** `8463` (see [Server Ports](/proton-ports))
25+
26+
## Quick start
27+
28+
```bash
29+
# interactive shell
30+
proton client -h 127.0.0.1 --ask-password
31+
32+
# one-shot query
33+
proton client -q "SELECT version()"
34+
35+
# load NDJSON
36+
proton client -q "INSERT INTO events FORMAT JSONEachRow" < events.ndjson
37+
38+
# dump to CSV (wrap the stream with table(...) so the query is bounded)
39+
proton client -q "SELECT * FROM table(events) FORMAT CSVWithNames" > events.csv
40+
```

0 commit comments

Comments
 (0)