Dino.DremIO 1.0.6

This package has a SemVer 2.0.0 package version: 1.0.6+fix-json-text.
dotnet add package Dino.DremIO --version 1.0.6
                    
NuGet\Install-Package Dino.DremIO -Version 1.0.6
                    
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="Dino.DremIO" Version="1.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dino.DremIO" Version="1.0.6" />
                    
Directory.Packages.props
<PackageReference Include="Dino.DremIO" />
                    
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 Dino.DremIO --version 1.0.6
                    
#r "nuget: Dino.DremIO, 1.0.6"
                    
#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.
#addin nuget:?package=Dino.DremIO&version=1.0.6
                    
Install Dino.DremIO as a Cake Addin
#tool nuget:?package=Dino.DremIO&version=1.0.6
                    
Install Dino.DremIO as a Cake Tool

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

Build

  1. Clone the repository to your machine:
    git clone <repository_url>
    cd <repository_folder>
    
  2. Add the library to your project:
    dotnet add package Dino.DremIO
    

NuGet Repository

The Dino.DremIONuget 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 is AppData\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 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. 
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
1.0.6 33 4/18/2025
1.0.5 38 3/28/2025
1.0.4 37 3/28/2025
1.0.3 34 3/28/2025
1.0.2 36 3/28/2025
1.0.1 33 3/28/2025
1.0.0 35 3/28/2025