Aspire.ClickHouse.Driver
13.1.2
Prefix Reserved
dotnet add package Aspire.ClickHouse.Driver --version 13.1.2
NuGet\Install-Package Aspire.ClickHouse.Driver -Version 13.1.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aspire.ClickHouse.Driver" Version="13.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aspire.ClickHouse.Driver" Version="13.1.2" />
<PackageReference Include="Aspire.ClickHouse.Driver" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Aspire.ClickHouse.Driver --version 13.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Aspire.ClickHouse.Driver, 13.1.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Aspire.ClickHouse.Driver@13.1.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Aspire.ClickHouse.Driver&version=13.1.2
#tool nuget:?package=Aspire.ClickHouse.Driver&version=13.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Aspire.ClickHouse.Driver
ClickHouse client integration for .NET Aspire using ClickHouse.Driver. Registers ClickHouseDataSource with health checks, OpenTelemetry tracing, and configuration binding.
Usage
In your service project:
var builder = WebApplication.CreateBuilder(args);
builder.AddClickHouseDataSource("clickhousedb");
Then inject and use it. The IClickHouseClient API is the most compact:
app.MapGet("/data", async (IClickHouseClient client) =>
{
var result = await client.ExecuteScalarAsync("SELECT count() FROM my_table");
return Results.Ok(result);
});
The ADO.NET ClickHouseDataSource is also available:
app.MapGet("/data", async (ClickHouseDataSource dataSource) =>
{
await using var connection = dataSource.CreateConnection();
await connection.OpenAsync();
await using var command = connection.CreateCommand();
command.CommandText = "SELECT count() FROM my_table";
var result = await command.ExecuteScalarAsync();
return Results.Ok(result);
});
Features
- Registers
ClickHouseDataSourceas a singleton in DI - Health checks via
PingAsync() - OpenTelemetry tracing via the
ClickHouse.Driveractivity source - Configuration binding from
Aspire:ClickHouse:Driversection - Keyed service support for multiple ClickHouse instances
Configuration
Via appsettings.json:
{
"Aspire": {
"ClickHouse": {
"Driver": {
"DisableHealthChecks": false,
"DisableTracing": false,
"HealthCheckTimeout": "00:00:05"
}
}
}
}
Or via delegate:
builder.AddClickHouseDataSource("clickhousedb", configureSettings: settings =>
{
settings.DisableHealthChecks = true;
});
Related packages
Use Aspire.Hosting.ClickHouse in your AppHost project to orchestrate ClickHouse containers.
More information
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- ClickHouse.Driver (>= 1.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.2)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.2)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.2)
- OpenTelemetry.Extensions.Hosting (>= 1.11.2)
-
net8.0
- ClickHouse.Driver (>= 1.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.2)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.2)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.2)
- OpenTelemetry.Extensions.Hosting (>= 1.11.2)
-
net9.0
- ClickHouse.Driver (>= 1.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.2)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.2)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.2)
- OpenTelemetry.Extensions.Hosting (>= 1.11.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 13.1.2 | 29 | 3/2/2026 |
| 0.0.1-test | 32 | 2/27/2026 |