An Aspire hosting integration for providing a DuckDB database connection.
Install
| Product | Versions |
|---|---|
| .NET |
README
CommunityToolkit.Aspire.Hosting.DuckDB library
Provides extension methods and resource definitions for the Aspire AppHost to support creating and running DuckDB databases.
DuckDB is an in-process analytical (OLAP) database, ideal for analytics workloads, Parquet/CSV querying, and data processing.
By default, the DuckDB resource will create a new DuckDB database in a temporary location. You can also specify a path to an existing DuckDB database file.
Getting Started
Install the package
In your AppHost project, install the package using the following command:
dotnet add package CommunityToolkit.Aspire.Hosting.DuckDB
Example usage
Then, in the Program.cs file of AppHost, define a DuckDB resource, then call AddDuckDB:
var duckdb = builder.AddDuckDB("analytics");
To use a read-only database for analytics:
var duckdb = builder.AddDuckDB("warehouse")
.WithReadOnly();
Additional Information
Feedback & contributing
Changes from Previous Version
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.