ClickHouse
ClickHouse (clickhouse)
Write events to a ClickHouse table using the HTTP interface or native endpoint.
Database json
Minimal example
output: clickhouse: endpoint: ~ table: ~JSON
{ "output": { "clickhouse": { "endpoint": null, "table": null } }}Contents
Fields
| Field | Type | Required | Description |
|---|---|---|---|
endpoint Connection | string | ✅ | Base endpoint (example: https://localhost:8443 or http://cluster-router:8123). |
table Connection | string | ✅ | Target table for writes. |
retry | Retry | How to retry failed inserts. | |
batch | Batch | Batch events before inserting. | |
database Connection | string | Optional database override; defaults to server-side default database. | |
input-field Payload | field (string) | Optional event field to treat as the raw payload. When omitted the entire event is used. Examples: data_field | |
columns Schema | Columns[] | Declarative column mapping; leave empty to stream JSONEachRow documents. | |
format Payload | Format | Insert format to use when sending data to ClickHouse. Allowed values: json-each-row, json-compact-each-row, csv, values | |
auth Authentication | Auth | Optional authentication settings (basic auth, token, or TLS material). | |
compression Connection | Compression | Optional compression codec negotiated with the server. Allowed values: none, lz4 | |
settings Connection | map (string) | Additional ClickHouse setting key/value pairs (forwarded as query params). | |
insecure-skip-verify Connection | boolean (bool) | Skip TLS certificate verification (development only). | |
timezone Connection | string | Optional timezone override used when formatting temporal data. |
Connection
Show fields
| Field | Type | Required | Description |
|---|---|---|---|
endpoint | string | ✅ | Base endpoint (example: https://localhost:8443 or http://cluster-router:8123). |
table | string | ✅ | Target table for writes. |
database | string | Optional database override; defaults to server-side default database. | |
compression | Compression | Optional compression codec negotiated with the server. Allowed values: none, lz4 | |
settings | map (string) | Additional ClickHouse setting key/value pairs (forwarded as query params). | |
insecure-skip-verify | boolean (bool) | Skip TLS certificate verification (development only). | |
timezone | string | Optional timezone override used when formatting temporal data. |
Payload
Show fields
| Field | Type | Required | Description |
|---|---|---|---|
input-field | field (string) | Optional event field to treat as the raw payload. When omitted the entire event is used. Examples: data_field | |
format | Format | Insert format to use when sending data to ClickHouse. Allowed values: json-each-row, json-compact-each-row, csv, values |
Schema
Show fields
| Field | Type | Required | Description |
|---|---|---|---|
columns | Columns[] | Declarative column mapping; leave empty to stream JSONEachRow documents. |
Authentication
Show fields
| Field | Type | Required | Description |
|---|---|---|---|
auth | Auth | Optional authentication settings (basic auth, token, or TLS material). |
Schema
- Retry Fields
- Batch Fields
- Columns Fields
- Auth Fields
- Settings Table
- Batch - Mode Options
- Format Options
- Compression Options
Retry Fields
| Field | Type | Required | Description |
|---|---|---|---|
timeout | time-interval (string) | ✅ | timeout (e.g. 500ms, 2s etc. - default is 30). Examples: 500ms, 2h |
retries | number (integer) | number of retries. Examples: 42, 1.2e-10 |
Batch Fields
| Field | Type | Required | Description |
|---|---|---|---|
fixed-size | number (integer) | maximum number of events in an output batch. Examples: 42, 1.2e-10 | |
mode | Mode | ✅ | If ‘document’ send on end of document generated by input. If ‘fixed’, use fixed_size.Allowed values: fixed, document |
timeout | time-interval (string) | ✅ | interval after which the batch is sent, to keep throughput going (default 100ms). Examples: 500ms, 2h |
header | multiline-text (string) | put a header line before the batch. | |
footer | multiline-text (string) | put a header line after the last line of the batch. | |
use-document-marker | boolean (bool) | Enrich the job metadata with a document marker (for document handling in batch mode). | |
wrap-as-json | boolean (bool) | Format the output batch as a JSON array. |
Columns Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | |
field | string | Event field name (dot-notation) to pull data from. | |
pointer | json-pointer (string) | JSON Pointer to extract from the event (used when field is insufficient). | |
expression | string | Optional ClickHouse expression to compute the column. | |
r-type | string | Explicit ClickHouse type (e.g. DateTime64(3), Nullable(String)). | |
default | string | Default value used when the source field/pointer resolves to null. | |
codec | string | Optional codec hint (e.g. LZ4, ZSTD). |
Auth Fields
| Field | Type | Required | Description |
|---|---|---|---|
username | string | ||
password | string | ||
access-token | string | ||
tls-certificate | string | ||
tls-key | string |
Settings Table
| Setting | Value |
|---|---|
setting.name | value |
Value format: templated-text.
Batch - Mode Options
| Value | Description |
|---|---|
fixed | Fixed |
document | Document |
Format Options
| Value | Description |
|---|---|
json-each-row | Json Each Row |
json-compact-each-row | Json Compact Each Row |
csv | Csv |
values | Values |
Compression Options
| Value | Description |
|---|---|
none | None |
lz4 | Lz4 |