SAP HANA Connection KNIME

Good morning everyone,

I have created and finalized my ML models and I even created a script to automatically run the jobs on a schedule.

One thing that I have left and I can’t seem to figure out is my data. I am currently running a Python script that connects to HANA and pulls data from there for my model to train and test on ( eventually to generate a prediction ).

I have tried using the generic database connector and I have added HANA drivers (.JAR) files but nothing is working and I am not sure how to proceed.

Has anyone gotten a generic database connector to work with KNIME? if so, can you share your experience and how you did it?

Hi,
in order to connect to SAP HANA you need to register the ngdbc.jar via the KNIME Preferences page.

image
The driver (ngdbc.jar) is part of the SAP HANA client and is located at:

  • C:\Program Files\sap\hdbclient\ on Windows
  • /usr/sap/hdbclient/ on Linux

Once the driver is registered you can select the com.sap.db.jdbc.Driver in the Database Connector node and specify the connection URL.

For further details about the driver and the connection URL please check out the SAP driver documentation.
Please also check out the attached workflow that connects to a local SAP HANA Express Edition for testing.

Bye
Tobias

SAP HANA.knwf (16.1 KB)

5 Likes

Tobias - thank you so much for replying.
I found the ngdbc.jar file in my HANA client installation and I added it to the Databases section in KNIME preferences.
The problem that I am encountering is that when I add the Database Connector node, I do not see the com.sap.db.jdbc.Driver :frowning: - it only shows the generic pre-built ones that it comes with.

pic1

1 Like

Hi,

Update: The new database framework is now out of labs and part of the standard KNIME installation so you no longer need to install the extension if you are using KNIME 4.0 or newer.

please send me you KNIME log by replying to the personal message I send to you. In addition you can also try out our new database framework which is still in preview but fully functional. To do so please install the KNIME Database (Preview) extension

Once it is installed you will find the Database (Labs) entry in the KNIME Preferences where you need to register the ngdbc.jar driver.

Finally you can use the new DB Connector (Labs) node which is available in the KNIME Labs->DB (Labs)->Connector section of the node repository and select HANA as driver name and enter the jdbc url in the database url field.

The DB Connector (Labs) node works together with all other DB (Labs) nodes that are available in the KNIME Labs->DB (Labs) category.

Bye
Tobias

5 Likes

Good morning Tobias,

I was able top get the LABS connector to work and I successfully queried HANA using KNIME :slight_smile: - Do you still want me to send you my KNIME log? if so , how do I do that?

Alex Mansur

1 Like

Hi Alex,
if you are fine with using the Labs node you no longer need to send me you log file. However if you want to use the existing db nodes and still have problems to use them send me your log file by answering to the private message I send to you today.
Bye
Tobias

1 Like

Thank you for the help Tobias - I will continue to use toe LABS node since it is working :slight_smile:

2 Likes

Perfect