Hi Nicola,

It's a question I was asking myself the other day.
I don't know the answer but I do have an exploration direction:
Avatica client.

There is some nice description and diagram here
https://calcite.apache.org/avatica/docs/

And also a list of clients down bellow.

See https://calcite.apache.org/avatica/docs/#apache-phoenix-database-adapter-for-python

Please let me know how it goes and what you find out.


On 31.01.2022 00:35, Nicola Vitucci wrote:
Hi all,

What would be the best way to use Calcite with Python? I've come up with
two potential solutions:

- using the jaydebeapi package, to connect via the JDBC driver directly
from a JVM created via jpype;
- using Apache Arrow via the pyarrow package, to connect in basically the
same way but creating Arrow objects with JdbcToArrowUtils (and optionally
converting them to Pandas).

Although the former is more straightforward, the latter allows to achieve
better performance (see [1] for instance) since it's exactly what Arrow is
for. I've created two Jupyter notebooks [2] showing each solution. What
would you recommend? Is there an even better approach?

Thanks,

Nicola

[1] https://uwekorn.com/2020/12/30/fast-jdbc-revisited.html
[2] https://github.com/nvitucci/calcite-sparql/tree/v0.0.2/examples/python


Regards,
--
Eugen Stan

+40770 941 271  / https://www.netdava.com
begin:vcard
fn:Eugen Stan
n:Stan;Eugen
email;internet:[email protected]
tel;cell:+40720898747
x-mozilla-html:FALSE
url:https://www.netdava.com
version:2.1
end:vcard

Reply via email to