File tree Expand file tree Collapse file tree 2 files changed +54
-1
lines changed
datafusion-flight-sql-server Expand file tree Collapse file tree 2 files changed +54
-1
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ name = "datafusion-flight-sql-server"
33version.workspace = true
44edition.workspace = true
55license.workspace = true
6- readme.workspace = true
76repository.workspace = true
87description = " Datafusion flight sql server."
8+ readme = " README.md"
99
1010[lib ]
1111name = " datafusion_flight_sql_server"
Original file line number Diff line number Diff line change 1+ # DataFusion Flight SQL Server
2+
3+ The ` datafusion-flight-sql-server ` is a Flight SQL server that implements the
4+ necessary endpoints to use DataFusion as the query engine.
5+
6+ ## Getting Started
7+
8+ To use ` datafusion-flight-sql-server ` in your Rust project, run:
9+
10+ ``` sh
11+ $ cargo add datafusion-flight-sql-server
12+ ```
13+
14+ ## Example
15+
16+ Here's a basic example of setting up a Flight SQL server:
17+
18+ ``` rust
19+ use datafusion_flight_sql_server :: service :: FlightSqlService ;
20+ use datafusion :: {
21+ execution :: {
22+ context :: SessionContext ,
23+ options :: CsvReadOptions ,
24+ },
25+ };
26+
27+ async {
28+ let dsn : String = " 0.0.0.0:50051" . to_string ();
29+ let remote_ctx = SessionContext :: new ();
30+ remote_ctx
31+ . register_csv (" test" , " ./examples/test.csv" , CsvReadOptions :: new ())
32+ . await . expect (" Register csv" );
33+
34+ FlightSqlService :: new (remote_ctx . state ()). serve (dsn . clone ())
35+ . await
36+ . expect (" Run flight sql service" );
37+
38+ };
39+ ```
40+
41+ This example sets up a Flight SQL server listening on ` 127.0.0.1:50051 ` .
42+
43+
44+ ## Docs
45+
46+ [ Docs link] ( https://datafusion-contrib.github.io/datafusion-flight-sql-server/datafusion_flight_sql_server/ ) .
47+
48+
49+ ## Acknowledgments
50+
51+ This repository was a Rust crate that was first built as a part of
52+ [ datafusion-federation] ( https://github.com/datafusion-contrib/datafusion-federation/ )
53+ repository.
You can’t perform that action at this time.
0 commit comments