17 releases

0.4.13 Oct 28, 2025
0.4.11 Jul 30, 2025
0.4.6 Jan 20, 2025
0.4.3 Dec 23, 2024
0.4.1 Nov 10, 2024

#2256 in Database interfaces

Download history 1/week @ 2025-07-16 135/week @ 2025-07-30 9/week @ 2025-08-06 14/week @ 2025-08-20 2/week @ 2025-08-27 28/week @ 2025-09-10 36/week @ 2025-09-17 71/week @ 2025-09-24 72/week @ 2025-10-01 33/week @ 2025-10-08 7/week @ 2025-10-15 157/week @ 2025-10-22 75/week @ 2025-10-29

278 downloads per month

Apache-2.0

51KB
1K 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.

Docs

Docs link.

Acknowledgments

This repository was a Rust crate that was first built as a part of datafusion-federation repository.

Dependencies

~97MB
~2M SLoC