DataFusionSharp.Data 0.4.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package DataFusionSharp.Data --version 0.4.3
                    
NuGet\Install-Package DataFusionSharp.Data -Version 0.4.3
                    
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="DataFusionSharp.Data" Version="0.4.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DataFusionSharp.Data" Version="0.4.3" />
                    
Directory.Packages.props
<PackageReference Include="DataFusionSharp.Data" />
                    
Project file
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 DataFusionSharp.Data --version 0.4.3
                    
#r "nuget: DataFusionSharp.Data, 0.4.3"
                    
#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 DataFusionSharp.Data@0.4.3
                    
#: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=DataFusionSharp.Data&version=0.4.3
                    
Install as a Cake Addin
#tool nuget:?package=DataFusionSharp.Data&version=0.4.3
                    
Install as a Cake Tool

DataFusionSharp.Data

ADO.NET provider for DataFusionSharp — enables standard .NET data access patterns (DbConnection, DbCommand, DbDataReader) on top of the high-performance Apache DataFusion query engine.

Note: This is an independent community project and is not officially associated with or endorsed by the Apache Software Foundation or the Apache DataFusion project.

Installation

dotnet add package DataFusionSharp.Data

This package depends on DataFusionSharp, which will be installed automatically.

Quick Start

Raw ADO.NET

using DataFusionSharp;
using DataFusionSharp.Data;

// Create runtime and session (managed by the core DataFusionSharp library)
using var runtime = DataFusionRuntime.Create();
using var session = runtime.CreateSessionContext();

// Register data sources on the session
await session.RegisterCsvAsync("orders", "path/to/orders.csv");

// Create an ADO.NET connection wrapping the session
await using var connection = session.AsConnection();
await connection.OpenAsync();

// Execute a query with parameters
await using var command = connection.CreateCommand();
command.CommandText = "SELECT order_id, order_amount FROM orders WHERE order_status = @status";
command.Parameters.Add(new DataFusionSharpParameter("@status", "Completed"));

await using var reader = await command.ExecuteReaderAsync();
while (await reader.ReadAsync())
    Console.WriteLine($"  Order #{reader.GetInt64(0)}: {reader.GetInt64(1)}");

With Dapper

DataFusionSharp.Data is compatible with Dapper and other libraries that work through DbConnection:

using Dapper;
using DataFusionSharp;
using DataFusionSharp.Data;

using var runtime = DataFusionRuntime.Create();
using var session = runtime.CreateSessionContext();
await session.RegisterCsvAsync("orders", "path/to/orders.csv");

await using var connection = session.AsConnection();

// Strongly-typed query
var results = await connection.QueryAsync<OrderSummary>(
    "SELECT customer_id AS CustomerId, SUM(order_amount) AS Total FROM orders GROUP BY customer_id");

foreach (var r in results)
    Console.WriteLine($"  Customer {r.CustomerId}: {r.Total}");

// Scalar query with parameters (@param syntax is auto-translated to DataFusion's $param)
var count = await connection.ExecuteScalarAsync<long>(
    "SELECT COUNT(*) FROM orders WHERE order_status = @status",
    new { status = "Completed" });

record OrderSummary(long CustomerId, long Total);

Features

  • DbConnection — wraps a SessionContext; Open/Close manage logical state only (no network connection)
  • DbCommand — executes SQL queries against DataFusion; returns DbDataReader or scalar values
  • DbDataReader — forward-only, read-only, streaming row reader over Arrow RecordBatch results
  • DbParameter — named parameters with prefix-insensitive lookup (@, $, : prefixes all accepted)
  • Parameter translation@param placeholders in SQL are automatically translated to DataFusion's native $param syntax
  • Dapper compatible — works out-of-the-box with Dapper's QueryAsync<T>, ExecuteScalarAsync, and other extensions
  • Extension methodsession.AsConnection() for convenient connection creation

Requirements

  • .NET 8.0 or later
  • DataFusionSharp (installed automatically)
  • Supported platforms:
    • Linux (x64, arm64)
    • Windows (x64)
    • macOS (arm64)

Documentation

For more information, examples, and source code, visit the GitHub repository.

See the QueryDataWithDapper example for a complete working sample.

License

DataFusionSharp is licensed under the Apache License 2.0. See LICENSE.txt for details.

This project contains bindings to Apache DataFusion, which is also licensed under Apache License 2.0. See NOTICE.txt for attribution details.

Acknowledgments


Apache®, Apache DataFusion™, Apache Arrow™, and the Apache feather logo are trademarks of The Apache Software Foundation.

Product 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 was computed.  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.

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
0.5.1 34 4/4/2026
0.4.3 65 3/30/2026