Apache.Arrow.Adbc
0.24.0
dotnet add package Apache.Arrow.Adbc --version 0.24.0
NuGet\Install-Package Apache.Arrow.Adbc -Version 0.24.0
<PackageReference Include="Apache.Arrow.Adbc" Version="0.24.0" />
<PackageVersion Include="Apache.Arrow.Adbc" Version="0.24.0" />
<PackageReference Include="Apache.Arrow.Adbc" />
paket add Apache.Arrow.Adbc --version 0.24.0
#r "nuget: Apache.Arrow.Adbc, 0.24.0"
#:package Apache.Arrow.Adbc@0.24.0
#addin nuget:?package=Apache.Arrow.Adbc&version=0.24.0
#tool nuget:?package=Apache.Arrow.Adbc&version=0.24.0
Apache Arrow ADBC
An implementation of Arrow ADBC targeting .NET Standard 2.0 and .NET 6 or later.
Driver Manager
The Apache.Arrow.Adbc.DriverManager namespace provides a .NET implementation of the ADBC Driver Manager, based on the C interface defined in adbc_driver_manager.h.
Features
- Driver discovery: search for ADBC drivers by name across configurable directories (environment variable, user-level, system-level).
- TOML driver manifests: locate drivers via
.tomlmanifest files that specify the shared library path per platform. - Connection profiles: load reusable connection configurations (driver + options) from
.tomlprofile files. - Managed (.NET) drivers: load .NET drivers via a scheme-prefixed
entrypoint(dotnet:for .NET 5+,netfx:for .NET Framework 4.x). - Custom profile providers: plug in your own
IConnectionProfileProviderimplementation.
Driver Manifest Format
A driver manifest is a TOML file describing where a driver lives and how to load it. The format is shared across all ADBC driver-manager implementations and documented in docs/source/format/driver_manifests.rst.
Native Driver Manifest Example (Snowflake)
manifest_version = 1
name = "Snowflake"
version = "1.5.2"
publisher = "snowflake.com"
[Driver]
entrypoint = "AdbcDriverSnowflakeInit"
[Driver.shared]
windows_amd64 = "C:\\path\\to\\adbc_driver_snowflake.dll"
linux_amd64 = "/usr/local/lib/libadbc_driver_snowflake.so"
macos_arm64 = "/opt/homebrew/lib/libadbc_driver_snowflake.dylib"
Managed Driver Manifest Example (BigQuery)
Managed .NET drivers use a scheme-prefixed entrypoint:
dotnet:for modern .NET (.NET 5 and later, including .NET 8 / .NET 10)netfx:for .NET Framework 4.x
The host process rejects a manifest whose scheme doesn't match its runtime, so a dotnet: manifest on a .NET Framework process (or vice versa) fails with a clear error rather than mysteriously failing inside the assembly loader.
manifest_version = 1
name = "BigQuery"
version = "1.2.0"
[Driver]
entrypoint = "dotnet:Apache.Arrow.Adbc.Drivers.BigQuery.BigQueryDriver"
shared = "Apache.Arrow.Adbc.Drivers.BigQuery.dll"
shared is relative to the manifest's directory. Managed .NET assemblies are platform-neutral, so the single-string form of shared is usually appropriate; the platform-tuple table is also accepted.
Connection Profile Format
A connection profile points at a driver and supplies options to apply when opening a database. Profiles can name a driver by manifest name (resolved against the standard search paths), by direct path to a shared library, or by direct path to a manifest.
profile_version = 1
driver = "snowflake"
[Options]
adbc.snowflake.sql.account = "myaccount"
adbc.snowflake.sql.warehouse = "mywarehouse"
password = "{{ env_var(SNOWFLAKE_PASSWORD) }}"
If the profile points directly at a shared library that uses a non-default entrypoint (or at a managed assembly that needs a dotnet: / netfx: selector), supply it through the entrypoint option. The driver manager consumes that option and does not forward it to the driver:
profile_version = 1
driver = "C:\\path\\to\\Apache.Arrow.Adbc.Drivers.BigQuery.dll"
[Options]
entrypoint = "dotnet:Apache.Arrow.Adbc.Drivers.BigQuery.BigQueryDriver"
adbc.bigquery.project_id = "my-project"
adbc.bigquery.json_credential = "{{ env_var(BIGQUERY_JSON_CREDENTIAL) }}"
Format Notes
- Use
profile_version = 1for the version field (legacyversionis also supported for backward compatibility) - Use
[Options]for the options section (legacy[options]is also supported for backward compatibility) - Boolean option values are converted to the string equivalents
"true"or"false". - String values may contain
{{ env_var(NAME) }}placeholders, which are expanded from process environment variables whenResolveEnvVars()is called. The{{and}}delimiters serve as escapes: any text outside placeholders is treated literally. Placeholders may appear anywhere inside a value and may be repeated. A missing environment variable expands to an empty string. Onlyenv_var(NAME)is recognized; other content inside a placeholder is an error.
Managed Driver Loading (.NET Core / .NET 8)
When loading managed .NET drivers using LoadManagedDriver, the driver manager uses Assembly.LoadFrom() which has different behavior on .NET Core/.NET 8 compared to .NET Framework:
Dependency Resolution
On .NET Core/.NET 8, dependencies are resolved in the following order:
The
.deps.jsonfile - If present alongside the driver assembly, this file describes all dependencies and their locations. This is automatically generated when building with the .NET SDK.The assembly's directory - Dependencies in the same directory as the driver are discovered automatically.
The application's probing paths - Standard .NET Core probing paths are searched.
Best Practices for Driver Authors
Include a
.deps.jsonfile - Build your driver with the .NET SDK to automatically generate this file. It ensures all dependencies are properly resolved.Deploy dependencies alongside the driver - Place all required DLLs in the same directory as your driver assembly.
Consider self-contained deployment - For maximum compatibility, publish your driver as a self-contained deployment with all dependencies included.
Test on both .NET Framework and .NET 8 - Assembly loading behavior differs, so test on both platforms if you support both.
Advanced Scenarios
For applications requiring isolated loading or explicit dependency resolution, consider using AssemblyLoadContext directly:
// Example of isolated loading (requires .NET Core 3.0+)
var loadContext = new AssemblyLoadContext("MyDriverContext", isCollectible: true);
var assembly = loadContext.LoadFromAssemblyPath(driverPath);
// ... use the driver ...
loadContext.Unload(); // Unload when done (if collectible)
Security Features
The Driver Manager includes security features to protect against common attacks when loading drivers dynamically.
Path Traversal Protection
The driver manager validates all paths from manifest files to prevent path traversal attacks:
- Paths containing
..sequences are rejected - Paths containing null bytes are rejected
- Relative paths in manifests are validated to ensure they don't escape the manifest directory
// Manual path validation
DriverManagerSecurity.ValidatePathSecurity(userProvidedPath, "driverPath");
// Validate and resolve a relative path against a base directory
string resolvedPath = DriverManagerSecurity.ValidateAndResolveManifestPath(
manifestDirectory, relativePath);
Driver Allowlist
Restrict which drivers can be loaded by configuring an allowlist:
// Only allow drivers from specific directories
DriverManagerSecurity.Allowlist = new DirectoryAllowlist(new[]
{
@"C:\Program Files\ADBC\Drivers",
@"C:\MyApp\TrustedDrivers"
});
// Only allow specific managed driver types
DriverManagerSecurity.Allowlist = new TypeAllowlist(new[]
{
"Apache.Arrow.Adbc.Drivers.BigQuery.BigQueryDriver",
"Apache.Arrow.Adbc.Drivers.Snowflake.SnowflakeDriver"
});
// Combine multiple restrictions (all must pass)
DriverManagerSecurity.Allowlist = new CompositeAllowlist(
new DirectoryAllowlist(trustedDirectories),
new TypeAllowlist(trustedTypes)
);
Audit Logging
Log all driver load attempts for security monitoring:
public class MyAuditLogger : IDriverLoadAuditLogger
{
public void LogDriverLoadAttempt(DriverLoadAttempt attempt)
{
Console.WriteLine($"[{attempt.TimestampUtc:O}] {attempt.LoadMethod}: " +
$"{attempt.DriverPath} - {(attempt.Success ? "SUCCESS" : "FAILED: " + attempt.ErrorMessage)}");
}
}
// Enable audit logging
DriverManagerSecurity.AuditLogger = new MyAuditLogger();
The DriverLoadAttempt class captures:
TimestampUtc- When the load was attemptedDriverPath- Path to the driverTypeName- Type name for managed drivers (null for native)ManifestPath- Path to manifest if usedSuccess- Whether the load succeededErrorMessage- Error details if failedLoadMethod- Which method was used (LoadDriver, LoadManagedDriver, etc.)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Apache.Arrow (>= 23.0.0)
- System.Diagnostics.DiagnosticSource (>= 9.0.6)
- System.Text.Json (>= 9.0.9)
-
net10.0
- Apache.Arrow (>= 23.0.0)
-
net8.0
- Apache.Arrow (>= 23.0.0)
- System.Diagnostics.DiagnosticSource (>= 9.0.6)
NuGet packages (15)
Showing the top 5 NuGet packages that depend on Apache.Arrow.Adbc:
| Package | Downloads |
|---|---|
|
Apache.Arrow.Adbc.Client
Package Description |
|
|
Apache.Arrow.Adbc.Drivers.Apache
Package Description |
|
|
Kurrent.Quack.Arrow
Package Description |
|
|
Apache.Arrow.Adbc.Drivers.FlightSql
Package Description |
|
|
Apache.Arrow.Adbc.Drivers.BigQuery
Package Description |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Apache.Arrow.Adbc:
| Repository | Stars |
|---|---|
|
ErrorLSC/Polars.NET
.NET DataFrame Engine, powered by Arrow and Polars
|
| Version | Downloads | Last Updated |
|---|---|---|
| 0.24.0 | 252 | 7/28/2026 |
| 0.23.0 | 225,009 | 4/7/2026 |
| 0.22.0 | 232,065 | 1/9/2026 |
| 0.21.0 | 29,515 | 11/7/2025 |
| 0.20.0 | 72,743 | 9/12/2025 |
| 0.19.0 | 4,351 | 7/7/2025 |
| 0.18.0 | 3,053 | 5/6/2025 |
| 0.17.0 | 247,370 | 3/7/2025 |
| 0.16.0 | 261,207 | 1/21/2025 |
| 0.15.0 | 2,935 | 11/13/2024 |
| 0.14.0 | 2,818 | 9/5/2024 |
| 0.13.0 | 2,847 | 7/5/2024 |
| 0.12.0 | 2,818 | 5/21/2024 |
| 0.11.0 | 2,936 | 3/31/2024 |