ibis icon indicating copy to clipboard operation
ibis copied to clipboard

feat: SAP HANA backend

Open Excidion opened this issue 2 years ago • 7 comments

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

  • [X] I agree to follow this project's Code of Conduct

Excidion avatar Aug 30 '23 08:08 Excidion

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.

cpcloud avatar Aug 31 '23 16:08 cpcloud

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 avatar Nov 28 '23 02:11 lostmygithubaccount

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

lostmygithubaccount avatar Nov 28 '23 15:11 lostmygithubaccount

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 avatar Dec 01 '23 23:12 Excidion

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?

Excidion avatar Apr 08 '24 15:04 Excidion

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

lostmygithubaccount avatar Apr 08 '24 15:04 lostmygithubaccount

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?

Excidion avatar Apr 10 '24 20:04 Excidion

If someone is still interested, taking a look at the postgres backend or the duckdb backend in ibis/backends/{postgres,duckdb}/__init__.py would be the place to start.

Closing as not planned, as we won't be implementing this ourselves.

cpcloud avatar Sep 11 '24 18:09 cpcloud