Skip to main content

Crate faucet_sink_clickhouse

Crate faucet_sink_clickhouse 

Source
Expand description

§faucet-sink-clickhouse

ClickHouse sink for the faucet-stream ecosystem, built on the ClickHouse HTTP interface via reqwest.

Writes each page as a batched INSERT … FORMAT JSONEachRow request (the statement travels in the query URL parameter, the newline-delimited JSON rows in the request body). Optionally enables ClickHouse asynchronous inserts (async_insert) for high-throughput small-batch ingestion.

Upsert semantics in ClickHouse are engine-dependent (e.g. ReplacingMergeTree collapses duplicate keys at merge time). The sink is therefore append-only (WriteMode::Append) and never emulates upsert — model deduplication in the table’s engine instead.

let cfg = ClickHouseSinkConfig::new("http://localhost:8123", "events");
let sink = ClickHouseSink::new(cfg)?;

Structs§

ClickHouseConnection
Shared connection configuration for the ClickHouse source and sink.
ClickHouseSink
ClickHouse sink (HTTP interface, INSERT … FORMAT JSONEachRow).
ClickHouseSinkConfig
Configuration for ClickHouseSink.

Constants§

DESCRIPTOR
The connector’s static descriptor (RFC 0013): its capabilities, answered from config alone.