9 releases

new 0.4.5 Jan 12, 2025
0.4.4 Jan 4, 2025
0.4.3 Dec 23, 2024
0.4.1 Nov 10, 2024
0.2.1 Sep 6, 2024

#1116 in Database interfaces

Download history 75/week @ 2024-09-24 167/week @ 2024-10-01 18/week @ 2024-10-08 7/week @ 2024-10-15 12/week @ 2024-10-22 3/week @ 2024-10-29 82/week @ 2024-11-05 35/week @ 2024-11-12 11/week @ 2024-11-19 11/week @ 2024-11-26 7/week @ 2024-12-10 172/week @ 2024-12-17 70/week @ 2024-12-24 129/week @ 2024-12-31 85/week @ 2025-01-07

458 downloads per month

Apache-2.0

180KB
4K SLoC

DataFusion Flight SQL Server

The datafusion-flight-sql-server is a Flight SQL server that implements the necessary endpoints to use DataFusion as the query engine.

Getting Started

To use datafusion-flight-sql-server in your Rust project, run:

$ cargo add datafusion-flight-sql-server

Example

Here's a basic example of setting up a Flight SQL server:

use datafusion_flight_sql_server::service::FlightSqlService;
use datafusion::{
    execution::{
        context::SessionContext,
        options::CsvReadOptions,
    },
};

async {
    let dsn: String = "0.0.0.0:50051".to_string();
    let remote_ctx = SessionContext::new();
    remote_ctx
        .register_csv("test", "./examples/test.csv", CsvReadOptions::new())
        .await.expect("Register csv");

    FlightSqlService::new(remote_ctx.state()).serve(dsn.clone())
        .await
        .expect("Run flight sql service");

};

This example sets up a Flight SQL server listening on 127.0.0.1:50051.

Dependencies

~83MB
~1.5M SLoC