ClickHouse.Driver NuGet package.
HTTP
The HTTP client provides the high-level, thread-safeClickHouseClient API and the ADO.NET API
used by ORMs. It targets .NET 6.0 and newer and is recommended for most applications.
Use the HTTP client when you need:
- ADO.NET or an ORM;
- CSV, JSONEachRow, Parquet, or raw stream input and output;
- bearer authentication or custom HTTP headers;
- custom parameter type resolution, parameter formatting, or read conversion;
- a per-query database or role;
- better
JSONperformance. The TCP client can transferJSONvalues only as text.
Native TCP
The native TCP client is experimental, and its public API may change in a future release. It provides theClickHouseTcpClient API for columnar block reads, native compression, pooled connections, and
pinned sessions. It targets .NET 8.0 and newer.
Use the native TCP client when you need:
- better performance, especially when processing data in columns;
- columnar data blocks;
- persistent connections;
- pinned sessions through
OpenSessionAsync; - progress, profile, log, totals, and extremes callbacks;
- W3C trace context propagation to ClickHouse.