pub struct DistributedCheckSection {
pub cluster: String,
pub table: String,
pub sharding_key: Option<String>,
pub sharding_expr: Option<String>,
pub endpoint: Option<String>,
}Expand description
The opt-in distributed_check: block — a startup guard verifying that
the sink config, the cluster topology, and the Distributed table’s
DDL agree (see ClickHouseSink::validate_distributed).
sink:
clickhouse:
distributed_check:
cluster: prod
table: analytics.events_dist # db-qualified, or bare like `table`
sharding_key: sensor # expected DDL expr = xxHash64(sensor)
# sharding_expr: "xxHash64(sensor)" # escape hatch — exactly one
# endpoint: "http://ch-front:8123" # default: shard 0, replica 0Fields§
§cluster: StringThe cluster the Distributed table is defined over.
table: StringThe Distributed table to check, optionally db.table-qualified
(an unqualified name resolves like the sink table).
sharding_key: Option<String>The sharding key column; the expected DDL expression becomes
xxHash64(<sharding_key>). Exactly one of this or sharding_expr.
sharding_expr: Option<String>Escape hatch: the full expected sharding expression, compared
textually after normalization (whitespace and identifier quoting
stripped) — inherently more brittle than sharding_key.
endpoint: Option<String>Endpoint to query for system.clusters / system.tables. The
Distributed table may live on a front node outside the shards:
list; defaults to the first replica of shard 0.
Trait Implementations§
Source§impl Clone for DistributedCheckSection
impl Clone for DistributedCheckSection
Source§fn clone(&self) -> DistributedCheckSection
fn clone(&self) -> DistributedCheckSection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more