Skip to main content
The ClickHouse sink is the recommended production destination. It routes events to the appropriate tables based on event type, batches inserts per table, and flushes all tables concurrently.

Configuration

[sinks.clickhouse]
host = "localhost:8123"
database = "tell"
username = "default"
password = ""
FieldDefaultNotes
hostClickHouse HTTP address (required)
database"default"Database name
username"default"Authentication username
password""Authentication password
batch_size1000Rows per table before flush
flush_interval"5s"Time-based flush interval

Tables

The sink writes to 7 tables following the Tell v1.1 schema:
TablePopulated by
events_v1TRACK events from SDKs
users_v1IDENTIFY events (core identity)
user_devicesIDENTIFY events (device links)
user_traitsIDENTIFY events (key-value traits)
context_v1CONTEXT events (device/location)
logs_v1Log entries from syslog and SDKs
snapshots_v1Connector snapshots (GitHub, Stripe, etc.)
IDENTIFY events fan out to three tables in parallel: users_v1, user_devices, and user_traits.

Performance

  • Per-table batching — each table accumulates rows independently, so a burst of logs doesn’t delay event flushes
  • Concurrent flush — all tables are flushed in parallel using tokio tasks
  • LZ4 compression — enabled by default for wire transport
  • Retry with backoff — 3 attempts with exponential backoff (100ms base, 10s max) on transient failures

Arrow HTTP transport

Two implementations are available:
  • Row-based (default) — uses the clickhouse crate with row structs
  • Arrow-based — sends Arrow-format HTTP inserts for higher throughput
The Arrow transport is selected automatically when available and provides better performance at high event volumes.

Setup

Tell can create the ClickHouse schema automatically:
tell setup-db --host localhost:8123 --database tell
This creates the database, all 7 tables, and the default user. See ClickHouse Setup for details.