Skip to content

Commit

Permalink
Add README.md to datafusion-flight-sql-server directory
Browse files Browse the repository at this point in the history
release-plz throw an error because it couldn't find the previous README.md
  • Loading branch information
hozan23 committed Feb 5, 2025
1 parent 4d569e2 commit 04d949d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
2 changes: 1 addition & 1 deletion datafusion-flight-sql-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name = "datafusion-flight-sql-server"
version.workspace = true
edition.workspace = true
license.workspace = true
readme.workspace = true
repository.workspace = true
description = "Datafusion flight sql server."
readme = "README.md"

[lib]
name = "datafusion_flight_sql_server"
Expand Down
53 changes: 53 additions & 0 deletions datafusion-flight-sql-server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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:

```sh
$ cargo add datafusion-flight-sql-server
```

## Example

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

```rust
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](https://datafusion-contrib.github.io/datafusion-flight-sql-server/datafusion_flight_sql_server/).


## Acknowledgments

This repository was a Rust crate that was first built as a part of
[datafusion-federation](https://github.com/datafusion-contrib/datafusion-federation/)
repository.

0 comments on commit 04d949d

Please sign in to comment.