Skip to Content
Technical Articles
Author's profile photo Joseph Yeruva

SAP HANA DB & Rapid Miner Integration


If you have SAP HANA data base which stores all the enterprise transactional data and want to apply predictive/machine learning algorithms on the HANA data base tables or views using Rapid Miner. This blog gives you the steps to connect SAP HANA data base from Rapid Miner and retrieve tables/views/procedures data and apply Rapid Miner statistical algorithms or machine learning techniques to get the insights of data.

Back Ground and use case:

 Rapid Miner is a data science platform for teams that unites data prep, machine learning, text mining and predictive model deployment. It is used for business and commercial applications as well as for research, education, training, rapid prototyping, and application development and supports all steps of the machine learning process including data preparation, results visualization, model validation and optimization.

SAP HANA is an in-memory, column-oriented, relational database management system developed and marketed by SAP SE. Its primary function as a database server is to store and retrieve data as requested by the applications.

With the SAP HANA 2.0 Data Platform of structured and unstructured data I wanted to do the proof of concept on Text analysis, Market basket analysis, Customer segmentation and other data science use cases using Rapid Miner Studio.

The below step by step procedure helps to  connect HANA DB tables/views/procedures from Rapid miner studio.

SAP HANA DB & Rapid Miner Integration steps:

  1. Prerequisites : You must have below before trying your hands on Rapid miner models on HANA data.HANA CLIENT Tools (Which installs required drivers in the client machine)Rapid Miner Studio Client (Interface to develop Rapid miner models).User Account in HANA DB with read access on DB Objects.

           Optional: Install HANASTUDIO/WEB IDE to analyze or preview SAP HANA data.

  1. Once you Install HANA Client tools, you will see ngdbc.jar file in the below path

C:\Program Files\SAP\hdbclient

Place this ngdbc.jar file below Rapid miner installation folder path

C:\Program Files\RapidMiner\RapidMiner Studio\lib\jdbc

  1. Open the Rapid Miner studio and create data base driver .

Go to manage data base drivers and enter the following parameters as shown in picture

Name of driver: HANA_JDBC

Jar file: C:\Program Files\RapidMiner\RapidMiner Studio\lib\jdbc\ngdbc.jar  Port : 30115

Driver class:

  1. Now go to manage data base connections , create data base connection with below parameters. Select previously created driver in the data base system Give the HANA system host, port ,user id, password

Do the test connection- you should see success message.

Now you can use tables or views or write SQL script  to retrieve the data.

  1. Now use read database operator,db connect process to import the data and process the data using rapid miner models.

From read data base parameters, you can connect tables or views or you can write custom HANA SQL Query. Ex: DW.COMPANY_DIM Table

Writing custom SQL query : Using below option you can write your own HANA SQL Query and pull required fields,aggregated data,apply filters.

Once you get the data using read data base operator.Process it using the available operators based on the ML/ Predictive use case.

Thank You,

Joseph Reddy Y

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo BALAJI Sundaram
      BALAJI Sundaram

      Thank you Joseph,

      This process did work for us and very helpful!!!

      Will contact you if more clarifications are needed.

      Author's profile photo Someswara Rao Uddanda
      Someswara Rao Uddanda

      Useful document.....Thank you Joseph!!!