Skip to main content

Crate faucet_source_clickhouse

Crate faucet_source_clickhouse 

Source
Expand description

§faucet-source-clickhouse

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

Runs a SQL SELECT, streams the typed JSONCompactEachRowWithNamesAndTypes response body into StreamPages (bytes are line-buffered and decoded incrementally, so memory stays bounded regardless of result size), and supports incremental replication via a tracking column (see ClickHouseReplication). Mirrors the faucet-source-postgres / mysql / mssql query sources.

let cfg = ClickHouseSourceConfig::new(
    "http://localhost:8123",
    "SELECT id, email, updated_at FROM events",
);
let source = ClickHouseSource::new(cfg)?;

Structs§

ClickHouseConnection
Shared connection configuration for the ClickHouse source and sink.
ClickHouseSource
ClickHouse query source (HTTP interface, typed compact JSON rows).
ClickHouseSourceConfig
Configuration for ClickHouseSource.

Enums§

ClickHouseReplication
How the source replicates rows across runs.

Constants§

BOOKMARK_TOKEN
The token a query uses to read the incremental bookmark (WHERE updated_at >= @bookmark).
DESCRIPTOR
The connector’s static descriptor (RFC 0013): its capabilities, answered from config alone.