Dino.Dremio.EntityframeworkCore.Provider
2.2.1
dotnet add package Dino.Dremio.EntityframeworkCore.Provider --version 2.2.1
NuGet\Install-Package Dino.Dremio.EntityframeworkCore.Provider -Version 2.2.1
<PackageReference Include="Dino.Dremio.EntityframeworkCore.Provider" Version="2.2.1" />
<PackageVersion Include="Dino.Dremio.EntityframeworkCore.Provider" Version="2.2.1" />
<PackageReference Include="Dino.Dremio.EntityframeworkCore.Provider" />
paket add Dino.Dremio.EntityframeworkCore.Provider --version 2.2.1
#r "nuget: Dino.Dremio.EntityframeworkCore.Provider, 2.2.1"
#:package Dino.Dremio.EntityframeworkCore.Provider@2.2.1
#addin nuget:?package=Dino.Dremio.EntityframeworkCore.Provider&version=2.2.1
#tool nuget:?package=Dino.Dremio.EntityframeworkCore.Provider&version=2.2.1
Dino.DremIO
Overview
This repository provides a .NET client and an EF Core provider for connecting to Dremio. The solution is organized into two main areas:
Dino.DremIO: services, client code and helpers for interacting with the Dremio API.Dino.Dremio.EntityframeworkCore.Provider: an EF Core provider enabling EF queries against Dremio via the project's SQL generation and storage layers.
See the provider documentation for detailed usage: Dino.Dremio.EntityframeworkCore.Provider/README.md
Key projects
Dino.DremIO/: main project containing services, models, options, and tests.Dino.Dremio.EntityframeworkCore.Provider/: EF Core provider implementation (Extensions, Query, Storage, Infrastructure).Dino.DremIO.Tests/: unit and integration tests.
Build & Test
Requirements: .NET SDK 7.0 or newer.
Build the entire solution:
dotnet build Dino.DremIO.sln -c Debug
Run tests:
dotnet test Dino.DremIO.Tests/Dino.DremIO.Tests.csproj
Quickstart
- Add a project reference to
Dino.Dremio.EntityframeworkCore.Provider. - Register your
DbContextusingUseDremio(...)(see the provider README for examples).
Contributing
Please open an issue or pull request if you need more detailed documentation, real-world configuration examples, or support for a specific Dremio setup.
DremIO Client Library
Introduction
DremIO Client Library is a C# library that helps you execute SQL queries on DremIO via API. The library provides classes that support connection management, query execution, job status tracking, and result retrieval efficiently.
Installation
- Clone the repository to your machine:
git clone <repository_url> cd <repository_folder> - Add the library to your project:
dotnet add package Dino.DremIO
NuGet Repository
The Dino.DremIO package will get you easily set up with ASP.NET.
You can download the library from NuGet using the following command:
dotnet add package Dino.DremIO --version <latest_version>
Or visit: NuGet Gallery
Configuring DremIOOption
The DremIOOption class contains connection configuration details for DremIO.
Structure
var options = new DremIOOption
{
UserName = "your_username",
Password = "your_password",
EndpointUrl = "https://your-dremio-endpoint.com"
};
UserName: Username to log into DremIO.Password: Password.TokenStore: Path for storing the token (default isAppData\Local\DremIOtokenStore).EndpointUrl: DremIO API endpoint URL.
Using DremIOService
The DremIOService class is the main class for sending queries to DremIO.
Initializing the Service
var client = new DremIOClient(options);
var service = new DremIOService(client);
Sending an SQL Query
var payload = new PayloadSqlRequest { Sql = "SELECT * FROM my_table" };
var result = await service.QueryAsync<Dictionary<string, object>>(payload);
Managing Context with DremIOContext
The DremIOContext class enables executing SQL queries within a specific context.
Creating a Context
var context = service.CreateContext("my_space", "my_folder");
Sending a Query and Getting Job ID
var jobId = await context.QueryAsync("SELECT * FROM my_table");
Waiting for Job Completion and Retrieving Results
await foreach (var row in context.QueryWaitAsync<Dictionary<string, object>>("SELECT * FROM my_table"))
{
Console.WriteLine(row);
}
Managing Jobs with DremIOJob
The DremIOJob class allows monitoring job status and retrieving results.
Creating a Job
var job = service.CreateJob();
Checking Job Status
var jobResponse = await job.GetAsync(jobId);
Console.WriteLine($"Job State: {jobResponse?.JobState}");
Waiting for Job Completion
var completedJob = await job.WaitAsync(jobId);
Retrieving All Job Results
await foreach (var row in job.ResultAllAsync<Dictionary<string, object>>(jobId))
{
Console.WriteLine(row);
}
Error Handling and Debugging
- If the query fails, an exception will be thrown.
- If the job does not complete within the timeout period, a
TimeoutExceptionwill occur. - Check
JobStateto determine whether the job was successful.
License
MIT License. Please refer to the LICENSE file for more details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net7.0 is compatible. 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 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. |
-
net10.0
- Dino.DremIO (>= 2.2.1)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.3)
- Newtonsoft.Json (>= 13.0.4)
-
net7.0
- Dino.DremIO (>= 2.2.1)
- Microsoft.EntityFrameworkCore.Relational (>= 7.0.20)
- Newtonsoft.Json (>= 13.0.4)
-
net8.0
- Dino.DremIO (>= 2.2.1)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.24)
- Newtonsoft.Json (>= 13.0.4)
-
net9.0
- Dino.DremIO (>= 2.2.1)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.13)
- Newtonsoft.Json (>= 13.0.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.