Skip to content

Commit 04d949d

Browse files
committed
Add README.md to datafusion-flight-sql-server directory
release-plz throw an error because it couldn't find the previous README.md
1 parent 4d569e2 commit 04d949d

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

datafusion-flight-sql-server/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name = "datafusion-flight-sql-server"
33
version.workspace = true
44
edition.workspace = true
55
license.workspace = true
6-
readme.workspace = true
76
repository.workspace = true
87
description = "Datafusion flight sql server."
8+
readme = "README.md"
99

1010
[lib]
1111
name = "datafusion_flight_sql_server"
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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.

0 commit comments

Comments
 (0)