Skip to content

Latest commit

 

History

1,322 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ClickHouse C# client


NuGet Version NuGet Downloads

About

Official C# client for ClickHouse. The ClickHouse.Driver NuGet package contains two clients:

  • HTTP client: ClickHouseClient and an ADO.NET provider for ORMs. It sends data in the RowBinary format over HTTP(S). Use it for most applications.
  • Native TCP client (experimental): ClickHouseTcpClient. It uses the ClickHouse native protocol and sends data in columnar blocks.

Documentation

Full documentation is on the ClickHouse website:

Usage examples

We have a wide range of examples, aiming to cover typical scenarios of client usage. They are grouped by client: HTTP and native TCP.

Choosing a client

HTTP Native TCP
Status Stable Experimental. The API can change in a future release.
Main API ClickHouseClient, ADO.NET (ClickHouseConnection) ClickHouseTcpClient
.NET versions 6.0 and newer 8.0 and newer
Default ports 8123 (HTTP), 8443 (HTTPS) 9000, 9440 (TLS)
Performance Fast Even faster: about 2x for typical reads and 1.5x for writes
ADO.NET and ORMs (Dapper, EF Core, linq2db) Yes No
CSV, JSONEachRow, Parquet, and raw streams Yes No
JSON performance Better: binary transfer Text transfer only
Bearer authentication and custom HTTP headers Yes No
Columnar block reads No Yes
Progress, profile, and server log callbacks No Yes
W3C trace context propagation to ClickHouse No Yes

The overview gives more information about when to use each client.

ClickHouse versions

Both clients support the last 3 releases plus the last 2 LTS releases of the ClickHouse server.

Contact us

If you have any questions or need help, feel free to reach out to us in the Community Slack or via GitHub issues.

Contributing

Contributions are welcome and highly appreciated! Check out our contributing guide.

Official integrations

Acknowledgements

Originally created by Oleg V. Kozlyuk

About

Official .NET client for ClickHouse DB

Resources

Code of conduct

Contributing

Stars

94 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages