SAP HANA as VDP data source

Applies to: Denodo 8.0 , Denodo 7.0 , Denodo 6.0
Last modified on: 18 Jun 2020
Tags: SAP Connectivity JDBC data sources

Download document

You can translate the document:

SAP HANA

SAP HANA (High-performance ANalytic Appliance) is an in-memory appliance for SAP systems.

SAP HANA provides a JDBC driver that enables Java applications to connect to the SAP HANA database with the JDBC application programming interface. Therefore, Denodo is going to use a JDBC adapter for accessing SAP HANA as a data source.

Connecting to SAP HANA from Denodo:

  1. Check that the JDBC driver, that comes with SAP HANA, is located under one of these paths:
  • C:/Program Files/sap/hdbclient/ on Microsoft Windows platforms.
  • /usr/sap/hdbclient/ on Linux and UNIX platforms.

  1. For Denodo 8 the driver is to be added using the VDP Administration Tool by going to the menu File > Extension Management and then Libraries tab selecting the JDBC Drivers option in the drop down menu. Then click on Import, select Version as sap-hana-1 and click on Add to upload the jar file. After doing this, you will find this driver in the location: <DENODO_HOME>/lib/extensions/jdbc-drivers-external/sap-hana-1.

For previous Denodo versions, copy the corresponding jar file to <DENODO_HOME>/lib-external/jdbc-drivers/sap-hana-1 directory. (where DENODO_HOME is the Denodo Platform installation directory) and restart the Virtual DataPort server. In the case

  1. From the Virtual DataPort Administration tool, create a new JDBC data source:

  1. Fill the form with the following parameters:
  • Database adapter: SAP HANA 1
  • Driver class: com.sap.db.jdbc.Driver
  • Database URI: use a connection string in the form of:

jdbc:sap://<server>:<port>[/?<option1>[&<option2>]...]

For example: jdbc:sap://host:30015/?autocommit=false. The port should follow the syntax 3<instance number>15. For example: 30015, if the instance is 00.

You can specify one or more failover servers by adding additional hosts, as in the following example:

jdbc:sap://host:30015,host1:30015,host2:30015/?autocommit=false

  1. Once the data source is created, VDP will perform the introspection and will display the tables in the SAP HANA database.

  1. Using the list of introspective tables you will be able to access the data stored in SAP HANA from VDP.

Accessing SAP HANA parameterized views from Denodo

Due to an SAP HANA JDBC driver restriction, the SAP HANA parameters/variables are not supported, the following steps can be followed in order to create a base view in Denodo to access any SAP HANA parameterized views:

  1. From the VDP Admin tool, double-click on the SAP HANA data source.
  2. Go to the “Create base view” tab.
  3. Click on the “Create from query” button.
  4. Set the name of the base view.
  5. Specify the corresponding SAP HANA SQL sentence to query the desired table and use the required variable(s). Additionally, in order to create a Denodo variable(s) related to the SAP HANA variable(s), you need to replace the value of the SAP HANA variable with the Denodo syntax for its own variables: @{denodo_variable_name}. For instance:

  • Original SAP HANA query

SELECT

"ATTR_1", "ATTR_2", ...

FROM #PARAMETERIZED_VIEW#

       (placeholder."$$SAP_HANA_VARIABLE_NAME$$"=>'#VALUE#')

GROUP BY "ATTR_1"

  • SAP HANA query using Denodo parameters (replacing #VALUE# with Denodo parameter @{parameter})

SELECT

"ATTR_1", "ATTR_2", ...

FROM #PARAMETERIZED_VIEW#

       (placeholder."$$SAP_HANA_VARIABLE_NAME$$"=>'@{DENODO_VARIABLE_NAME}')

GROUP BY "ATTR_1"

  1. After clicking on the “Ok” button, you need to provide a value for the Denodo parameter in order for the base view to be created.

References

Importing JDBC Sources

Connect to SAP HANA, express edition using JDBC

Questions

Ask a question
You must sign in to ask a question. If you do not have an account, you can register here

Featured content

DENODO TRAINING

Ready for more? Great! We offer a comprehensive set of training courses, taught by our technical instructors in small, private groups for getting a full, in-depth guided training in the usage of the Denodo Platform. Check out our training courses.

Training