Thursday, 15 June 2017

Connecting Insights for ArcGIS to HANA

Insights can reference data in databases, in ArcGIS (your content, your organization’s content, Esri supplied demographics and so forth), and in spreadsheets.  The connectivity from Insights to HANA incorporates specific optimizations to maximize performance.  This means Insights can, with ease, fetch and manipulate large data sets returned from HANA.


While setting up demo environments with Insights and HANA, I found that although there is plenty of information on configuration, it either assumes deep knowledge of administering an ArcGIS instance or the needed information is spread across a number of places.  I’m writing this blog to pull this information together in one place with screenshots, links and what I learned to hopefully save you time.

What you need to get started


The version of 64 bit SAP Client for Windows (or Linux) you’ll need depends on which OS Insights for ArcGIS is running on. Don’t forget to download the version of the SAP Client that corresponds to the version of HANA you are connecting to.  In this blog, I’ll assume Insights is installed on a Windows VM or machine. Check here to verify you are running a compatible version of HANA.

Insights requires the ngdbc.jar file which is part of the SAP Client for Windows install – 64 bit.  Assuming you’ve installed it on your C:\ drive, the JAR file can be found here: C:\Program Files\sap\hdbclient

If you don’t need to install the SAP Client, you can extract the JAR file from the install itself and bypass the actual installation of the SAP Client.

Before proceeding, you must create a zip file of the JAR file.  For example, ngdbc.zip.  Create the zip file and place it on your desktop or another directory.  Windows will usually not let you create the zip file in the C:\Program Files directory.  The reason for creating the zip file is that you can’t upload a JAR file using the ArcGIS Server Admin Directory utility.

Configuring SAP HANA connectivity for Insights for ArcGIS


To upload the zip file, you use the ArcGIS Server Admin Directory utility.  It is invoked via a web browser by surfing to the following URL:

http://<server>:6080/arcgis/admin

where <server> is the name of the server or instance running ArcGIS Server.

The following webpage will display:


Once you enter the appropriate credentials or token and login, the following webpage will appear:


To upload the JAR file, click on uploads, then on upload.  The following webpage will display:


Browse to the zip file you created containing the ngdbc.jar file, enter a brief description (e.g. “SAP HANA Express”) and click Upload.  The following page will display:


You might want to make a note of the Item ID for use when registering the data source.  To register the data source, click on Home in the breadcrumb trail on the webpage.  This will return you to the homepage.

Click on the following resource link: data

Once you’ve clicked on data, click on relationalDataStoreTypes, then click on register.  The following webpage should display:


Click on the – select uploaded item – pulldown.  The just uploaded item should appear.  If there’s more than one item listed, use the Item ID you noted earlier to select the right one.  For the relational datastore, click on the – select type – pulldown and select SAP HANA.  Click on Register Item to register HANA as the datasource.  HANA is now available as a datasource in Insights.

After uploading and registering the JAR file, you must not only restart ArcGIS Server (forced as part of the upload/register) but also restart the ArcGIS Datastore.

Connecting to an SAP HANA instance in Insights


Now that you have successfully uploaded and registered the ngdbc.zip file with ArcGIS Server, Insight users can now create new workbooks, and connect and interact with data in HANA. For details on how to connect to a new datasource in Insights.

To access data in HANA from Insights for ArcGIS, the associated table(s) in HANA must meet certain requirements:
  • There must be no more than one spatial column
  • There must be a unique primary key
  • Both columns must be NOT NULL
  • The SRID of the spatial column must be either 3857 or 1000004326
  • All values in the spatial column must be the same spatial datatype.  It’s OK if the column datatype is the supertype ST_GEOMETRY, but the column can’t contain a mix of spatial datatypes (i.e. ST_POINT, ST_POLYGON, ST_LINESTRING, etc).  See here for supported HANA spatial datatypes.