ibis-project / ibis

the portable Python dataframe library
https://ibis-project.org
Apache License 2.0
5.02k stars 585 forks source link

feat: SAP HANA backend #6966

Open Excidion opened 1 year ago

Excidion commented 1 year ago

Is your feature request related to a problem?

I would like to use ibis with a SAP Hana database.

Describe the solution you'd like

Adding a back end class for Hana, for example based on the existing BaseAlchemyBackend together with sqlalchemy-hana.

There also exists this python module but I don't know which would be the best way forward.

What version of ibis are you running?

6.1.0

What backend(s) are you using, if any?

None

Code of Conduct

cpcloud commented 1 year ago

Thanks for the issue!

The SQLAlchemy dialect age is concerning, but the hdbcli library looks promising.

If we did this it'd probably be a new sqlglot-based backend similar to the clickhouse backend, using the DBAPI for any interactions with the database.

lostmygithubaccount commented 9 months ago

since this was opened, it looks like the sqlalchemy package has been released several times and updated: https://pypi.org/project/sqlalchemy-hana/#history

lostmygithubaccount commented 9 months ago

another option could be building on top of the hana.ml dataframes: https://help.sap.com/doc/1d0ebfe5e8dd44d09606814d83308d4b/2.0.06/en-US/hana_ml.dataframe.html

Excidion commented 9 months ago

With Ibis missing Hana support I am using those hana-ml DataFrames right now but must admit they are a bit odd to use. As they mention here that library is itself build upon the aforementioned hdbcli.

Excidion commented 5 months ago

since this was opened, it looks like the sqlalchemy package has been released several times and updated: https://pypi.org/project/sqlalchemy-hana/#history

And the updates keep coming. Seems like there is some life again in the project. With this in mind would it change your @cpcloud proposed solution or do you still think the sqlglot-based backend is the preferable approach?

lostmygithubaccount commented 5 months ago

we have since migrated all backends to sqlglot -- sqlalchemy is no longer a dependency for any backend (we'll have a blog on that soon, and these changes will be released in 9.0.0 very soon)

@Excidion any change you'd be up for contributing this? we don't exactly have a new backend guide since the refactor to SQLGlot but could provide guidance

Excidion commented 5 months ago

I am no expert on either ibis or SAP Hana. So some documents to look into how to get started and what is even needed would be very helpful. Even just to know the size/scope. Do you have some links? Or is this backend guide you mentioned somewhere on the horizon?