Docs: add clickhousectl docs page, move ClickHouse Client to /interfaces/client by sdairs · Pull Request #101611 · ClickHouse/ClickHouse · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ docker run -it --rm --network=container:some-clickhouse-server --entrypoint clic
docker exec -it some-clickhouse-server clickhouse-client
```

More information about the [ClickHouse client](https://clickhouse.com/docs/interfaces/cli/).
More information about the [ClickHouse client](https://clickhouse.com/docs/interfaces/client/).

### connect to it using curl

Expand Down
2 changes: 1 addition & 1 deletion docker/server/README.src/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ docker run -it --rm --network=container:some-clickhouse-server --entrypoint clic
docker exec -it some-clickhouse-server clickhouse-client
```

More information about the [ClickHouse client](https://clickhouse.com/docs/interfaces/cli/).
More information about the [ClickHouse client](https://clickhouse.com/docs/interfaces/client/).

### connect to it using curl

Expand Down
2 changes: 1 addition & 1 deletion docs/en/engines/table-engines/special/memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ doc_type: 'reference'
:::note
When using the Memory table engine on ClickHouse Cloud, data is not replicated across all nodes (by design). To guarantee that all queries are routed to the same node and that the Memory table engine works as expected, you can do one of the following:
- Execute all operations in the same session
- Use a client that uses TCP or the native interface (which enables support for sticky connections) such as [clickhouse-client](/interfaces/cli)
- Use a client that uses TCP or the native interface (which enables support for sticky connections) such as [clickhouse-client](/interfaces/client)
:::

The Memory engine stores data in RAM, in uncompressed form. Data is stored in exactly the same form as it is received when read. In other words, reading from this table is completely free.
Expand Down
1,026 changes: 272 additions & 754 deletions docs/en/interfaces/cli.md

Large diffs are not rendered by default.

891 changes: 891 additions & 0 deletions docs/en/interfaces/client.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/en/interfaces/formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ e.g. `schemafile.proto:MessageType`.
If the file has the standard extension for the format (for example, `.proto` for `Protobuf`),
it can be omitted and in this case, the format schema looks like `schemafile:MessageType`.

If you input or output data via the [client](/interfaces/cli.md) in interactive mode, the file name specified in the format schema
If you input or output data via the [client](/interfaces/client.md) in interactive mode, the file name specified in the format schema
can contain an absolute path or a path relative to the current directory on the client.
If you use the client in the [batch mode](/interfaces/cli.md/#batch-mode), the path to the schema must be relative due to security reasons.
If you use the client in the [batch mode](/interfaces/client.md/#batch-mode), the path to the schema must be relative due to security reasons.
Comment thread
Blargian marked this conversation as resolved.

If you input or output data via the [HTTP interface](/interfaces/http) the file name specified in the format schema
should be located in the directory specified in [format_schema_path](/operations/server-configuration-parameters/settings.md/#format_schema_path)
Expand Down
3 changes: 2 additions & 1 deletion docs/en/interfaces/native-clients-interfaces-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ For more information see the pages below:

| Section | Summary |
|--------------------------------------------------------------|-------------------------------------------------------------------------------------|
| [Command-Line Client](/interfaces/cli) | Native command-line client supporting command-line options and configuration files. |
| [clickhousectl](/interfaces/cli) | The CLI for ClickHouse: local and cloud. |
| [ClickHouse Client](/interfaces/client) | Native command-line client supporting command-line options and configuration files. |
| [Drivers & Interfaces](/interfaces/overview) | A number of network interfaces, libraries and visual interfaces. |
| [SQL Console](/integrations/sql-clients/sql-console) | A fast and easy way to interact with your data in ClickHouse Cloud. |
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ A username and a password used to connect to other servers during [replication](

:::note
- By default, if `interserver_http_credentials` section is omitted, authentication is not used during replication.
- `interserver_http_credentials` settings do not relate to a ClickHouse client credentials [configuration](../../interfaces/cli.md#configuration_files).
- `interserver_http_credentials` settings do not relate to a ClickHouse client credentials [configuration](../../interfaces/client.md#configuration_files).
- These credentials are common for replication via `HTTP` and `HTTPS`.
:::

Expand Down
2 changes: 1 addition & 1 deletion docs/en/operations/settings/tcp-connection-limits.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ doc_type: 'reference'

## Overview {#overview}

You may have a ClickHouse TCP connection (i.e., one through the [command-line client](https://clickhouse.com/docs/interfaces/cli))
You may have a ClickHouse TCP connection (i.e., one through the [command-line client](https://clickhouse.com/docs/interfaces/client))
disconnect automatically after some number of queries or duration.
After disconnecting, no automatic reconnection occurs (unless triggered through something else,
such as sending another query in the command-line client).
Expand Down
18 changes: 9 additions & 9 deletions docs/en/operations/system-tables/query_log.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ You can use the [log_formatted_queries](/operations/settings/settings#log_format
- `interface` ([UInt8](../../sql-reference/data-types/int-uint.md)) — Interface that the query was initiated from. Possible values:
- 1 — TCP.
- 2 — HTTP.
- `os_user` ([String](../../sql-reference/data-types/string.md)) — Operating system username who runs [clickhouse-client](../../interfaces/cli.md).
- `client_hostname` ([String](../../sql-reference/data-types/string.md)) — Hostname of the client machine where the [clickhouse-client](../../interfaces/cli.md) or another TCP client is run.
- `client_name` ([String](../../sql-reference/data-types/string.md)) — The [clickhouse-client](../../interfaces/cli.md) or another TCP client name.
- `client_revision` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Revision of the [clickhouse-client](../../interfaces/cli.md) or another TCP client.
- `client_version_major` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Major version of the [clickhouse-client](../../interfaces/cli.md) or another TCP client.
- `client_version_minor` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Minor version of the [clickhouse-client](../../interfaces/cli.md) or another TCP client.
- `client_version_patch` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Patch component of the [clickhouse-client](../../interfaces/cli.md) or another TCP client version.
- `script_query_number` ([UInt32](../../sql-reference/data-types/int-uint.md)) — The query number in a script with multiple queries for [clickhouse-client](../../interfaces/cli.md).
- `script_line_number` ([UInt32](../../sql-reference/data-types/int-uint.md)) — The line number of the query start in a script with multiple queries for [clickhouse-client](../../interfaces/cli.md).
- `os_user` ([String](../../sql-reference/data-types/string.md)) — Operating system username who runs [clickhouse-client](../../interfaces/client.md).
- `client_hostname` ([String](../../sql-reference/data-types/string.md)) — Hostname of the client machine where the [clickhouse-client](../../interfaces/client.md) or another TCP client is run.
- `client_name` ([String](../../sql-reference/data-types/string.md)) — The [clickhouse-client](../../interfaces/client.md) or another TCP client name.
- `client_revision` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Revision of the [clickhouse-client](../../interfaces/client.md) or another TCP client.
- `client_version_major` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Major version of the [clickhouse-client](../../interfaces/client.md) or another TCP client.
- `client_version_minor` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Minor version of the [clickhouse-client](../../interfaces/client.md) or another TCP client.
- `client_version_patch` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Patch component of the [clickhouse-client](../../interfaces/client.md) or another TCP client version.
- `script_query_number` ([UInt32](../../sql-reference/data-types/int-uint.md)) — The query number in a script with multiple queries for [clickhouse-client](../../interfaces/client.md).
- `script_line_number` ([UInt32](../../sql-reference/data-types/int-uint.md)) — The line number of the query start in a script with multiple queries for [clickhouse-client](../../interfaces/client.md).
- `http_method` (UInt8) — HTTP method that initiated the query. Possible values:
- 0 — The query was launched from the TCP interface.
- 1 — `GET` method was used.
Expand Down
14 changes: 7 additions & 7 deletions docs/en/operations/system-tables/query_thread_log.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ Columns:
- `interface` ([UInt8](/sql-reference/data-types/int-uint#integer-ranges)) — Interface that the query was initiated from. Possible values:
- 1 — TCP.
- 2 — HTTP.
- `os_user` ([String](../../sql-reference/data-types/string.md)) — OS's username who runs [clickhouse-client](../../interfaces/cli.md).
- `client_hostname` ([String](../../sql-reference/data-types/string.md)) — Hostname of the client machine where the [clickhouse-client](../../interfaces/cli.md) or another TCP client is run.
- `client_name` ([String](../../sql-reference/data-types/string.md)) — The [clickhouse-client](../../interfaces/cli.md) or another TCP client name.
- `client_revision` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Revision of the [clickhouse-client](../../interfaces/cli.md) or another TCP client.
- `client_version_major` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Major version of the [clickhouse-client](../../interfaces/cli.md) or another TCP client.
- `client_version_minor` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Minor version of the [clickhouse-client](../../interfaces/cli.md) or another TCP client.
- `client_version_patch` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Patch component of the [clickhouse-client](../../interfaces/cli.md) or another TCP client version.
- `os_user` ([String](../../sql-reference/data-types/string.md)) — OS's username who runs [clickhouse-client](../../interfaces/client.md).
- `client_hostname` ([String](../../sql-reference/data-types/string.md)) — Hostname of the client machine where the [clickhouse-client](../../interfaces/client.md) or another TCP client is run.
- `client_name` ([String](../../sql-reference/data-types/string.md)) — The [clickhouse-client](../../interfaces/client.md) or another TCP client name.
- `client_revision` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Revision of the [clickhouse-client](../../interfaces/client.md) or another TCP client.
- `client_version_major` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Major version of the [clickhouse-client](../../interfaces/client.md) or another TCP client.
- `client_version_minor` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Minor version of the [clickhouse-client](../../interfaces/client.md) or another TCP client.
- `client_version_patch` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Patch component of the [clickhouse-client](../../interfaces/client.md) or another TCP client version.
- `http_method` ([UInt8](/sql-reference/data-types/int-uint#integer-ranges)) — HTTP method that initiated the query. Possible values:
- 0 — The query was launched from the TCP interface.
- 1 — `GET` method was used.
Expand Down
2 changes: 1 addition & 1 deletion docs/en/operations/system-tables/quotas.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Columns:
- `[]` — All users share the same quota.
- `['user_name']` — Connections with the same user name share the same quota.
- `['ip_address']` — Connections from the same IP share the same quota.
- `['client_key']` — Connections with the same key share the same quota. A key must be explicitly provided by a client. When using [clickhouse-client](../../interfaces/cli.md), pass a key value in the `--quota_key` parameter, or use the `quota_key` parameter in the client configuration file. When using HTTP interface, use the `X-ClickHouse-Quota` header.
- `['client_key']` — Connections with the same key share the same quota. A key must be explicitly provided by a client. When using [clickhouse-client](../../interfaces/client.md), pass a key value in the `--quota_key` parameter, or use the `quota_key` parameter in the client configuration file. When using HTTP interface, use the `X-ClickHouse-Quota` header.
- `['user_name', 'client_key']` — Connections with the same `client_key` share the same quota. If a key isn't provided by a client, the quota is tracked for `user_name`.
- `['client_key', 'ip_address']` — Connections with the same `client_key` share the same quota. If a key isn't provided by a client, the quota is tracked for `ip_address`.
- `['normalized_query_hash']` — Each distinct normalized query gets its own quota bucket. Queries that differ only in literal values (e.g. `SELECT 1` and `SELECT 2`) share the same bucket.
Expand Down
2 changes: 1 addition & 1 deletion docs/en/operations/system-tables/session_log.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Columns:
- `gRPC`
- `MySQL`
- `PostgreSQL`
- `client_hostname` ([String](../../sql-reference/data-types/string.md)) — The hostname of the client machine where the [clickhouse-client](../../interfaces/cli.md) or another TCP client is run.
- `client_hostname` ([String](../../sql-reference/data-types/string.md)) — The hostname of the client machine where the [clickhouse-client](../../interfaces/client.md) or another TCP client is run.
- `client_name` ([String](../../sql-reference/data-types/string.md)) — The `clickhouse-client` or another TCP client name.
- `client_revision` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Revision of the `clickhouse-client` or another TCP client.
- `client_version_major` ([UInt32](../../sql-reference/data-types/int-uint.md)) — The major version of the `clickhouse-client` or another TCP client.
Expand Down
2 changes: 1 addition & 1 deletion docs/en/sql-reference/data-types/datetime.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ A list of supported time zones can be found in the [IANA Time Zone Database](htt

You can explicitly set a time zone for `DateTime`-type columns when creating a table. Example: `DateTime('UTC')`. If the time zone isn't set, ClickHouse uses the value of the [timezone](../../operations/server-configuration-parameters/settings.md#timezone) parameter in the server settings or the operating system settings at the moment of the ClickHouse server start.

The [clickhouse-client](../../interfaces/cli.md) applies the server time zone by default if a time zone isn't explicitly set when initializing the data type. To use the client time zone, run `clickhouse-client` with the `--use_client_time_zone` parameter.
The [clickhouse-client](../../interfaces/client.md) applies the server time zone by default if a time zone isn't explicitly set when initializing the data type. To use the client time zone, run `clickhouse-client` with the `--use_client_time_zone` parameter.

ClickHouse outputs values depending on the value of the [date_time_output_format](../../operations/settings/settings-formats.md#date_time_output_format) setting. `YYYY-MM-DD hh:mm:ss` text format by default. Additionally, you can change the output with the [formatDateTime](../../sql-reference/functions/date-time-functions.md#formatDateTime) function.

Expand Down
4 changes: 2 additions & 2 deletions docs/en/sql-reference/statements/insert-into.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,13 @@ Use the syntax above to insert data from a file, or files, stored on the **clien

Compressed files are supported. The compression type is detected by the extension of the file name. Or it can be explicitly specified in a `COMPRESSION` clause. Supported types are: `'none'`, `'gzip'`, `'deflate'`, `'br'`, `'xz'`, `'zstd'`, `'lz4'`, `'bz2'`.

This functionality is available in the [command-line client](../../interfaces/cli.md) and [clickhouse-local](../../operations/utilities/clickhouse-local.md).
This functionality is available in the [command-line client](../../interfaces/client.md) and [clickhouse-local](../../operations/utilities/clickhouse-local.md).

**Examples**

### Single file with FROM INFILE {#single-file-with-from-infile}

Execute the following queries using [command-line client](../../interfaces/cli.md):
Execute the following queries using [command-line client](../../interfaces/client.md):

```bash
echo 1,A > input.csv ; echo 2,B >> input.csv
Expand Down
2 changes: 1 addition & 1 deletion docs/en/sql-reference/statements/select/format.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Specific format might be used either for convenience, integration with other sys

## Default Format {#default-format}

If the `FORMAT` clause is omitted, the default format is used, which depends on both the settings and the interface used for accessing the ClickHouse server. For the [HTTP interface](/interfaces/http) and the [command-line client](../../../interfaces/cli.md) in batch mode, the default format is `TabSeparated`. For the command-line client in interactive mode, the default format is `PrettyCompact` (it produces compact human-readable tables).
If the `FORMAT` clause is omitted, the default format is used, which depends on both the settings and the interface used for accessing the ClickHouse server. For the [HTTP interface](/interfaces/http) and the [command-line client](../../../interfaces/client.md) in batch mode, the default format is `TabSeparated`. For the command-line client in interactive mode, the default format is `PrettyCompact` (it produces compact human-readable tables).

## Implementation Details {#implementation-details}

Expand Down
4 changes: 2 additions & 2 deletions docs/en/sql-reference/statements/select/into-outfile.md