Multiple session, variety of data sources query server implemented by Rust.
Copyright (c) 2022 - 2023 SAL Ltd. - https://sal.co.jp
and other LLVM supported environment.
sh
$ cargo init server-executer
$ cd server-executer
```toml [package] name = "server-executer" version = "0.1.0" edition = "2021"
[dependencies] datafusion-server = "0.8.7" ```
rust
fn main() {
datafusion_server::entry();
}
```toml
[server] port = 4000 baseurl = "/" datadir = "./data" plugin_dir = "./plugins"
[session] defaultkeepalive = 3600 # in seconds
[log]
level = "debug" ```
sh
$ cargo run
Require Python interpreter v3.7+
```toml [package] name = "server-executor" version = "0.1.0" edition = "2021"
[dependencies] datafusion-server = { version = "0.8.7", features = ["plugin"] } ```
sh
$ cargo run
```toml [package] name = "server-executor" version = "0.1.0" edition = "2021"
[profile.release] opt-level = 'z' strip = true lto = "fat" codegen-units = 1
[dependencies] datafusion-server = { version = "0.8.7", features = ["plugin"] } ```
sh
$ cargo build --release
sh
$ cargo clean
sh
$ curl -X "POST" "http://localhost:4000/dataframe/query" \
-H 'Content-Type: application/json' \
-d $'
{
"dataSources": [
{
"options": {
"inferSchemaRows": 100,
"hasHeader": true
},
"name": "sales",
"location": "superstore.csv",
"format": "csv"
}
],
"query": {
"sql": "SELECT * FROM sales"
},
"response": {
"format": "json"
}
}'