Skip to content

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

FieldTypeRequiredDescription
endpoint ConnectionstringBase endpoint (example: https://localhost:8443 or http://cluster-router:8123).
table ConnectionstringTarget table for writes.
retryRetryHow to retry failed inserts.
batchBatchBatch events before inserting.
database ConnectionstringOptional database override; defaults to server-side default database.
input-field Payloadfield (string)Optional event field to treat as the raw payload. When omitted the entire event is used.
Examples: data_field
columns SchemaColumns[]Declarative column mapping; leave empty to stream JSONEachRow documents.
format PayloadFormatInsert format to use when sending data to ClickHouse.
Allowed values: json-each-row, json-compact-each-row, csv, values
auth AuthenticationAuthOptional authentication settings (basic auth, token, or TLS material).
compression ConnectionCompressionOptional compression codec negotiated with the server.
Allowed values: none, lz4
settings Connectionmap (string)Additional ClickHouse setting key/value pairs (forwarded as query params).
insecure-skip-verify Connectionboolean (bool)Skip TLS certificate verification (development only).
timezone ConnectionstringOptional timezone override used when formatting temporal data.

Connection

Show fields
FieldTypeRequiredDescription
endpointstringBase endpoint (example: https://localhost:8443 or http://cluster-router:8123).
tablestringTarget table for writes.
databasestringOptional database override; defaults to server-side default database.
compressionCompressionOptional compression codec negotiated with the server.
Allowed values: none, lz4
settingsmap (string)Additional ClickHouse setting key/value pairs (forwarded as query params).
insecure-skip-verifyboolean (bool)Skip TLS certificate verification (development only).
timezonestringOptional timezone override used when formatting temporal data.

Payload

Show fields
FieldTypeRequiredDescription
input-fieldfield (string)Optional event field to treat as the raw payload. When omitted the entire event is used.
Examples: data_field
formatFormatInsert format to use when sending data to ClickHouse.
Allowed values: json-each-row, json-compact-each-row, csv, values

Schema

Show fields
FieldTypeRequiredDescription
columnsColumns[]Declarative column mapping; leave empty to stream JSONEachRow documents.

Authentication

Show fields
FieldTypeRequiredDescription
authAuthOptional authentication settings (basic auth, token, or TLS material).

Schema

Retry Fields

FieldTypeRequiredDescription
timeouttime-interval (string)timeout (e.g. 500ms, 2s etc. - default is 30).
Examples: 500ms, 2h
retriesnumber (integer)number of retries.
Examples: 42, 1.2e-10

Batch Fields

FieldTypeRequiredDescription
fixed-sizenumber (integer)maximum number of events in an output batch.
Examples: 42, 1.2e-10
modeModeIf ‘document’ send on end of document generated by input. If ‘fixed’, use fixed_size.
Allowed values: fixed, document
timeouttime-interval (string)interval after which the batch is sent, to keep throughput going (default 100ms).
Examples: 500ms, 2h
headermultiline-text (string)put a header line before the batch.
footermultiline-text (string)put a header line after the last line of the batch.
use-document-markerboolean (bool)Enrich the job metadata with a document marker (for document handling in batch mode).
wrap-as-jsonboolean (bool)Format the output batch as a JSON array.

Columns Fields

FieldTypeRequiredDescription
namestring
fieldstringEvent field name (dot-notation) to pull data from.
pointerjson-pointer (string)JSON Pointer to extract from the event (used when field is insufficient).
expressionstringOptional ClickHouse expression to compute the column.
r-typestringExplicit ClickHouse type (e.g. DateTime64(3), Nullable(String)).
defaultstringDefault value used when the source field/pointer resolves to null.
codecstringOptional codec hint (e.g. LZ4, ZSTD).

Auth Fields

FieldTypeRequiredDescription
usernamestring
passwordstring
access-tokenstring
tls-certificatestring
tls-keystring

Settings Table

SettingValue
setting.namevalue

Value format: templated-text.

Batch - Mode Options

ValueDescription
fixedFixed
documentDocument

Format Options

ValueDescription
json-each-rowJson Each Row
json-compact-each-rowJson Compact Each Row
csvCsv
valuesValues

Compression Options

ValueDescription
noneNone
lz4Lz4