Merge pull request #5563 from BayoNet/DOCAPI-6213-send_progress_in_http_headers

DOCAPI-6213: Docs for send_progress_in_http_headers setting.
This commit is contained in:
alexey-milovidov 2019-06-16 03:05:30 +03:00 committed by GitHub
commit febca43a89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 1 deletions

View File

@ -205,7 +205,21 @@ For information about other parameters, see the section "SET".
Similarly, you can use ClickHouse sessions in the HTTP protocol. To do this, you need to add the `session_id` GET parameter to the request. You can use any string as the session ID. By default, the session is terminated after 60 seconds of inactivity. To change this timeout, modify the `default_session_timeout` setting in the server configuration, or add the `session_timeout` GET parameter to the request. To check the session status, use the `session_check=1` parameter. Only one query at a time can be executed within a single session.
You have the option to receive information about the progress of query execution in X-ClickHouse-Progress headers. To do this, enable the setting send_progress_in_http_headers.
You have the option to receive information about the progress of query execution in `X-ClickHouse-Progress` response headers. To do this, enable the setting [send_progress_in_http_headers](../operations/settings/settings.md#settings-send_progress_in_http_headers). Example of the header sequence:
```
X-ClickHouse-Progress: {"read_rows":"2752512","read_bytes":"240570816","total_rows_to_read":"8880128"}
X-ClickHouse-Progress: {"read_rows":"5439488","read_bytes":"482285394","total_rows_to_read":"8880128"}
X-ClickHouse-Progress: {"read_rows":"8783786","read_bytes":"819092887","total_rows_to_read":"8880128"}
```
Possible fields in the header:
- `read_rows` — Number of read rows.
- `read_bytes` — Volume of read data in bytes.
- `total_rows_to_read` — Total number of rows to be read.
- `written_rows` — Number of written rows.
- `written_bytes` — Volume of written data in bytes.
Running requests don't stop automatically if the HTTP connection is lost. Parsing and data formatting are performed on the server side, and using the network might be ineffective.
The optional 'query_id' parameter can be passed as the query ID (any string). For more information, see the section "Settings, replace_running_query".

View File

@ -114,6 +114,19 @@ Possible values:
Default value: 0.
## send_progress_in_http_headers {#settings-send_progress_in_http_headers}
Enables or disables sending of the `X-ClickHouse-Progress` HTTP response headers in an answer from `clickhouse-server`.
For more information, read the [HTTP interface description](../../interfaces/http.md).
Possible values:
- 0 — Disabled.
- 1 — Enabled.
Default value: 0.
## input_format_allow_errors_num
Sets the maximum number of acceptable errors when reading from text formats (CSV, TSV, etc.).