voltrondata / sqlflite

An example Flight SQL Server implementation - with DuckDB and SQLite back-ends.
Apache License 2.0
205 stars 23 forks source link

Hint or Example for DuckDB connection in Python instead of C++ #3

Closed thinkORo closed 1 year ago

thinkORo commented 1 year ago

Unfortunately, I'm not that familiar with C++, but I am with Python.

I have read the Apache Arrow Flight documentation (https://arrow.apache.org/cookbook/py/flight.html) and can therefore also build a Flight server in Python.

But I haven't yet understood how to integrate DuckDB as a query engine in Python in this Flight server (as it is in this C++ example), for example to execute SQL statements via ADBC.

I would be very, very pleased to receive a hint or a small example.

prmoore77 commented 1 year ago

Hi @thinkORo - I'm very sorry for the late reply! Unfortunately, there isn't a Python implementation yet for Flight SQL. There IS a Python implementation of Flight RPC (a layer in the stack below Flight SQL) - the one you reference from the Cookbook link.

I don't believe ADBC is intended for use with Flight RPC servers, but it does work with Flight SQL ones, and other database technologies (most recently Snowflake).

I will attempt to relay your desire to build a Flight SQL server in Python to the Arrow community, I also had that thought :)

thinkORo commented 1 year ago

Hi @prmoore77, thank you for your reply. And thank you for your support. I'll check Apache Arrow from time to time to see if anything new has come up.