This article covers:

  1. How to set up a connection to a SAP HANA database
  2. How to add datasets
  3. How to do connection overrides on a SAP HANA connection
  4. The supported SAP HANA data types and the respective Luzmo data type they are mapped to

1. How to setup a SAP HANA connection

To make a connection to a SAP HANA database, navigate to the Connections page, select New Connection, then select SAP HANA from the New Connection modal: You'll be asked to provide a host, key and token:

  • Host: this is the "SQL endpoint" of your SAP HANA instance.

    • Make sure the SQL endpoint ends with a port number: ':PORT'.
    • If using the SAP HANA public cloud, you can copy the SQL endpoint on the Instance management page in SAP HANA Cloud Central > Copy SQL Endpoint.

    sql-endpoint

  • Key: the username of the SAP HANA user. We advise to create a separate read-only technical user for connecting Luzmo to your SAP HANA databases.

  • Token: the password of the SAP HANA user

Please refer to the examples in our developer documentation to find out how to create a connection to SAP HANA using our API.

Notes:

  • Your SAP HANA instance must allow connections from Luzmo to be able to visualize SAP HANA data in dashboards. You can do this by whitelisting Luzmo's pool of proxy IP addresses as described here.
    • If using the SAP HANA public cloud, you'll find the IP whitelisting settings on the Instance management page in SAP HANA Cloud Central > Edit > Connections > Allowed connections > Allow only specific IP addresses and IP ranges. sql-endpoint

2. How to add datasets

Once you have connected your SAP HANA you can add datasets as explained here. You can select one or multiple datasets as available in your SAP HANA and link them in Luzmo to ensure they can be used together in a dashboard. Also make sure to check out this article on Preparing your data for analytics.

To find out how to add datasets using our API, please refer to this example in our developer documentation.

3. SAP HANA Connection Overrides

When generating an Authorization token to grant a user acces to your embedded dashboards it is possible to override the data source properties in the authorization request to dynamically use different properties. Find out more about connection overrides.

The fields available for overriding a SAP HANA connection are as follows:

  • Connection ID: The ID of the Connection to be overridden. Retrieve the ID to specify as detailed here.
  • host: The new "SQL endpoint" of your SAP HANA instance to connect to. Make sure the SQL endpoint ends with a port number: ':PORT' If using the SAP HANA public cloud, you can copy the SQL endpoint on the Instance management page in SAP HANA Cloud Central > Copy SQL Endpoint.
  • key: The username of the SAP HANA user. We advise to create a separate read-only technical user for connecting Luzmo to your SAP HANA databases.
  • token: The password of the SAP HANA user.
  • datasets: List of dataset-level overrides. Useful if you want to override only a single dataset in your dashboard or if you have a separate table per client.
    • schema: the new database to query.
    • table: The new table to query.

Our developer documentation has more info about connection overrides and an examples of SAP Hana connection overrides.

Example code demonstrating how to override a SAP Hana connection:

POST https://api.luzmo.com/0.1.0/authorization
{
"action":"create",
"version":"0.1.0",
"key": "< your API key >",
"token": "< your API token >",
"properties":{
  "type": "embed",
  ...,
  "account_overrides": { 
    "<your connection_id>": {
      "properties": {
        "host": "<The new sql endpoint to connect to>",
        "key": "<The new username of the SAP Hana user.>",
        "token": "<The new password for the SAP Hana user>"
      }
    }
  }
}
}

4. Supported Data Types

Data Type In SAP HANA Data Type In Luzmo
BIGINT numeric
DECIMAL numeric
DOUBLE numeric
INTEGER numeric
SMALLDECIMAL numeric
SMALLINT numeric
TINYINT numeric
REAL numeric
DATE datetime
TIME datetime
SECONDDATE datetime
TIMESTAMP datetime
All Other Data Types hierarchy

Need more information?

Do you still have questions? Let us know how we can help.
Send us feedback!