SoftSense.Databricks.SqlClient
0.0.1-prerelease19-786528c
This is a prerelease version of SoftSense.Databricks.SqlClient.
dotnet add package SoftSense.Databricks.SqlClient --version 0.0.1-prerelease19-786528c
NuGet\Install-Package SoftSense.Databricks.SqlClient -Version 0.0.1-prerelease19-786528c
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="SoftSense.Databricks.SqlClient" Version="0.0.1-prerelease19-786528c" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SoftSense.Databricks.SqlClient" Version="0.0.1-prerelease19-786528c" />
<PackageReference Include="SoftSense.Databricks.SqlClient" />
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 SoftSense.Databricks.SqlClient --version 0.0.1-prerelease19-786528c
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SoftSense.Databricks.SqlClient, 0.0.1-prerelease19-786528c"
#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 SoftSense.Databricks.SqlClient@0.0.1-prerelease19-786528c
#: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=SoftSense.Databricks.SqlClient&version=0.0.1-prerelease19-786528c&prerelease
#tool nuget:?package=SoftSense.Databricks.SqlClient&version=0.0.1-prerelease19-786528c&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Databricks Client SDK
High-performance .NET SDK for Databricks SQL Warehouse.
Features
- Execute SQL queries against Databricks SQL Warehouses
- Stream large result sets efficiently
- Azure Entra ID and PAT authentication
- Async/await support
- Automatic retry with exponential backoff
- AOT-compatible
Installation
dotnet add package SoftSense.Databricks.Core
dotnet add package SoftSense.Databricks.SqlClient
Quick Start
C#
using Azure.Identity;
using SoftSense.Databricks.Core.Configuration;
using SoftSense.Databricks.SqlClient;
var config = new DatabricksConfig
{
WorkspaceUrl = "https://adb-123456789.azuredatabricks.net",
Credential = new DefaultAzureCredential(),
WarehouseId = "your-warehouse-id"
};
using var client = new SqlWarehouseClient(config);
// Execute query
var result = await client.ExecuteQueryAsync("SELECT * FROM table");
// Stream large results
await foreach (var row in client.ExecuteQueryStreamAsync("SELECT * FROM large_table"))
{
ProcessRow(row);
}
Authentication
Azure Entra ID (Recommended)
var config = new DatabricksConfig
{
WorkspaceUrl = "https://adb-123456789.azuredatabricks.net",
Credential = new DefaultAzureCredential()
};
Personal Access Token
var config = new DatabricksConfig
{
WorkspaceUrl = "https://your-workspace.databricks.com",
AccessToken = Environment.GetEnvironmentVariable("DatabricksConfig__AccessToken")
};
Environment Variables
Configuration can be loaded from environment variables using .NET configuration notation:
# Windows
set DatabricksConfig__WorkspaceUrl=https://your-workspace.databricks.com
set DatabricksConfig__WarehouseId=your-warehouse-id
set DatabricksConfig__AccessToken=your-token
# Linux/macOS
export DatabricksConfig__WorkspaceUrl=https://your-workspace.databricks.com
export DatabricksConfig__WarehouseId=your-warehouse-id
export DatabricksConfig__AccessToken=your-token
Then load with configuration builder:
using Microsoft.Extensions.Configuration;
using SoftSense.Databricks.Core.Configuration;
var configuration = new ConfigurationBuilder()
.AddEnvironmentVariables()
.Build();
var config = configuration.GetSection("DatabricksConfig").Get<DatabricksConfig>();
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
WorkspaceUrl |
string | Required | Databricks workspace URL |
WarehouseId |
string | Optional | Default warehouse ID |
Credential |
TokenCredential | null | Azure Entra ID credential |
AccessToken |
string | null | Personal Access Token |
TimeoutSeconds |
int | 300 | HTTP request timeout |
MaxRetries |
int | 3 | Max retry attempts |
Note: Either Credential or AccessToken is required.
Error Handling
using SoftSense.Databricks.Core.Exceptions;
try
{
var result = await client.ExecuteQueryAsync(sql);
}
catch (DatabricksAuthenticationException ex)
{
Console.WriteLine($"Auth failed: {ex.Message}");
}
catch (DatabricksRateLimitException ex)
{
Console.WriteLine($"Rate limited. Retry after: {ex.RetryAfter}");
}
catch (DatabricksHttpException ex)
{
Console.WriteLine($"HTTP {ex.StatusCode}: {ex.Message}");
}
Building from Source
cd source/csharp
dotnet restore
dotnet build
dotnet test
Benchmarks
Performance benchmarks comparing batched vs streamed query execution are available in source/csharp/SoftSense.Databricks.Benchmarks.
cd source/csharp/SoftSense.Databricks.Benchmarks
dotnet run -c Release
See benchmark documentation for details.
License
Apache License 2.0 - see LICENSE file.
Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- SoftSense.Databricks.Core (>= 0.0.1-prerelease19-786528c)
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.0.1-prerelease19-786528c | 390 | 11/19/2025 |