The client of ClickHouse's HTTP interface that ClickhouseClient runs
on (@clickhouse/client's ClickHouseClient), sending its requests
with a pyfect HttpClient.
Every method is an effect: interrupting it aborts its request (the server
may still run the query; ClickhouseClient kills it). Failures are a
ClickhouseError for what the server answered and an HttpClientError
for a request that got no answer.
query: a statement with output,FORMAT <format>appended (JSONby default); itsResultSetreads the bodycommand: a statement without output (DDL); the body is drainedexec: a statement as written (its ownFORMAT), its body unreadinsert: rows into a table, encoded forformatping: the/pingendpoint, which checks no credentials
Values#
| Attribute | Type | Description |
|---|---|---|
STREAMABLE_JSON_FORMATS | frozenset[str] | Formats with one JSON value per line. |
SINGLE_DOCUMENT_JSON_FORMATS | frozenset[str] | Formats whose whole body is one JSON document. |
MAX_URL_BIND_PARAM_LENGTH | Literal[4096] = 4096 | How long a query's parameters may make the URL under
|
Types#
| Type | Definition | Description |
|---|---|---|
ClickhouseRequestError | type ClickhouseRequestError = ClickhouseError | HttpClientError | How a request fails: the server's error, or no answer. |
DataFormat | type DataFormat = str | A ClickHouse format name ( |
InsertValues | type InsertValues = Sequence[object] | Mapping[str, object] | bytes | str | Stream[Any, object] | What |
InsertColumns | type InsertColumns = Sequence[str] | Mapping[Literal['except'], Sequence[str]] | The columns an insert sets: |