SAP HANA
This is the implementation of the SAP HANA data handler for MindsDB.
SAP HANA, where HANA stands for High-performance ANalytic Appliance, is a multi-model database that stores data in its memory instead of keeping it on a disk. The column-oriented in-memory database design used by SAP HANA allows users to run advanced analytics alongside high-speed transactions in a single system.
Implementation
This handler is implemented using hdbcli
, the Python driver for SAP HANA.
The required arguments to establish a connection are as follows:
host
is the host name or IP address of the SAP HANA instance.port
is the port number of the SAP HANA instance.user
specifies the user name.password
specifies the password for the user.schema
sets the current schema, which is used for identifiers without a defined schema.
If you installed MindsDB locally via pip, you need to install all handler dependencies manually. To do so, go to the handler’s folder (mindsdb/integrations/handlers/hana_handler) and run this command: pip install -r requirements.txt
.
Usage
You can use the below SQL statements to create a schema in SAP HANA called MINDSDB
and a table called TEST
.
In order to make use of this handler and connect to the SAP HANA database in MindsDB, the following syntax can be used:
The above example assumes usage of SAP HANA Cloud, which requires the encrypt
parameter to be set to true
and uses port 443
.
You can use this established connection to query your table as follows:
On execution, we get:
ID | NAME | DESCRIPTION |
---|---|---|
1 | h | w |