Dino.DremIO
1.0.6
dotnet add package Dino.DremIO --version 1.0.6
NuGet\Install-Package Dino.DremIO -Version 1.0.6
<PackageReference Include="Dino.DremIO" Version="1.0.6" />
<PackageVersion Include="Dino.DremIO" Version="1.0.6" />
<PackageReference Include="Dino.DremIO" />
paket add Dino.DremIO --version 1.0.6
#r "nuget: Dino.DremIO, 1.0.6"
#addin nuget:?package=Dino.DremIO&version=1.0.6
#tool nuget:?package=Dino.DremIO&version=1.0.6
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
TimeoutException
will occur. - Check
JobState
to 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 | 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 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | 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.1
- Microsoft.Extensions.Http (>= 9.0.3)
- Microsoft.Extensions.Options (>= 9.0.3)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.3)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.