| Crates.io | dremio-rs |
| lib.rs | dremio-rs |
| version | 0.2.2 |
| created_at | 2024-09-29 03:02:45.507622+00 |
| updated_at | 2026-01-20 01:46:19.305549+00 |
| description | Dremio Rust client |
| homepage | |
| repository | https://github.com/foss-v/dremio-rs |
| max_upload_size | |
| id | 1390545 |
| size | 102,003 |
dremio-rs is a Rust client library designed for seamless interaction with Dremio's Flight SQL service. This project serves as both a robust client for Dremio and a learning platform for Rust development, focusing on data-related operations.
RecordBatches.async/await for non-blocking I/O.Add dremio-rs to your Cargo.toml:
[dependencies]
dremio-rs = "0.1.0" # Use the latest version
Here's a quick example of how to use dremio-rs to connect to Dremio, execute a query, and print the results:
use dremio_rs::Client;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut client = Client::new("http://localhost:32010", "dremio", "dremio123").await?;
// Execute a query and get record batches
let batches = client.get_record_batches("SELECT * FROM "@dremio"."sys.version"").await?;
for batch in batches {
println!("RecordBatch: {:?}", batch);
}
// Write query results to a Parquet file
client.write_parquet("SELECT * FROM "@dremio"."sys.version"", "version.parquet").await?;
Ok(())
}
Contributions are welcome! Please see CONTRIBUTING.md (coming soon) for more details.
This project is licensed under the MIT License - see the LICENSE-MIT file for details.