Crates.io | arrow-flightsql-odbc |
lib.rs | arrow-flightsql-odbc |
version | 0.3.0 |
source | src |
created_at | 2022-04-29 10:55:08.23673 |
updated_at | 2024-02-09 21:24:22.533771 |
description | An Apache Arrow Flight SQL server which proxies requests over ODBC |
homepage | |
repository | https://github.com/timvw/arrow-flightsql-odbc |
max_upload_size | |
id | 577279 |
size | 434,433 |
Ideally databases expose an Apache Arrow Flight SQL service immediately. Meanwhile, this project aims to implement an Apache Arrow Flight SQL server for ODBC data sources.
Currently the following commands are implemented (but far from optimal):
The server tries to connect to a SQL server via an ODBC connector. This needs to be specified via the ODBC_CONNECTION_STRING environment variable.
On my mac I have installed the mariadb-connector-odbc driver (brew install mariadb-connector-odbc) and I have an instance running on localhost.
export ODBC_CONNECTION_STRING="Driver=/usr/local/Cellar/mariadb-connector-odbc/3.1.15/lib/mariadb/libmaodbc.dylib;SERVER=localhost;USER=demo;PASSWORD=demo;PORT=3306;database=demo"
cargo run server
As on your local machine, the essential piece is to have a working ODBC_CONNECTION_STRING (driver + connectiond details). Here is how you can build a container with snowflake and mysql odbc drivers.
docker build . -f ./deploy/Dockerfile -t flightsql-odbc-server
The paths to those drivers are:
export SNOW_ODBC_CONNECTION_STRING="Driver=/usr/lib/snowflake/odbc/lib/libSnowflake.so;Server=account.eu-central-1.snowflakecomputing.com;UID=DEMO;PWD=DEMO;database=TEST_DEMO_DB;warehouse=DEMO_DWH"
export MYSQL_ODBC_CONNECTION_STRING="Driver=/mariadb-connector-odbc-2.0.15-ga-debian-x86_64/lib/libmaodbc.so;SERVER=hostname;USER=demo;PASSWORD=demo;PORT=3306;database=demo"
docker run --rm -it -e ODBC_CONNECTION_STRING="$MYSQL_ODBC_CONNECTION_STRING" -p 52358:52358 flightsql-odbc-server
Links:
Protocols:
Some code is copied from https://github.com/apache/arrow-rs/tree/master/arrow-flight/src/sql
Update (and format) renovate config
cat .github/renovate.json | jq | sponge .github/renovate.json