| from Simon Rost

Tableau on SAP Hana

First Steps with Tableau on SAP Hana

Both, Tableau and SAP Hana, are spreading like fire through companies in all kind of markets. Therefore, sooner or later one might be facing the problem of visualizing with Tableau on a SAP Hana database. For as long as Version 9.1 Tableau supports the connection to a SAP Hana database, hence this kind of architecture is nothing new. Still, at every project I took a part in, the same "first steps obstacles" seem to reoccur. In the following I am going to address a couple of basic steps, that, if not followed correctly, will keep you from using Tableau on Hana (If your company has already spent money for Tableau AND Hana licences, this is probably not in your own best interest.. ????).

The Setup

My basic set up here is the preconfigured Hana Express (with applications “EXA”) running on a local Suse Linux VM, provided by SAP [1]. I am not going into detail when it comes to installing. After all, SAP provides a very elaborate step-by-step setup guide [3], including YouTube videos and troubleshoot topics on many occasions (Cheers for that, SAP!). I will be connecting to Hana via a locally installed Tableau Desktop (2019.1) using 64-bit-jdbc-hana drivers (you need SAP Support Portal access to get your hands on those).
As both Hana and Tableau are running locally this is the simplest possible setup. I also (successfully) tried it with Tableau on Hana running on a Azure Cloud VM, but for now, we leave it at that. Our focus today lies elsewhere. Today we will look at the first most basic parameters, that will have to be adjusted in order to make Tableau and Hana interact properly.

Data
Again, to keep things simple, I am using a Kaggle [3] sample data set, solely consisting of comma-separated files (.CSV): The World Development Indicators Dataset. Hana Studio makes it quite easy to (up-)load flat-files. The dataset itself consists of the following tables:

• Country
• CountryNotes
• Footnotes
• Indicatores
• Series
• SeriesNotes

The data model is fairly simple with the "Indicators" table being the facts table, containing all kinds (more than 200+) of different world economic and environmental indicators. The other tables are mere dimension tables containing more information about countries and indicators series.

As the data itself, as interesting as it is, is not todays' topic, what is? In the following I want to show off some cases where one might run into problems when accessing those tables through Tableau.

The Configuration

Disabled ODBC/JDBC Access
This is not really a matter of missing permissions, but it's the first issue that tends to pop up in an enterprise context: The Hana admin has disabled the odbc/jdbc access to the database. Usually DB admins aren't too keen on departments accessing "their" database with third party tools (plus, this could also be relevant for licensing [4]), therefore the access has been disabled with a simple checkbox on the user level:

Disabled ODBC/JDBC Access

If your access has been limited, you will not be able to connect to the database via Tableau in the first place.

The Error message being somewhat misleading:

An error occurred while communication with SAP HANA

• [SAP AG][LIBODBCHDB DLL][HDBODBC] General error;10 authentication failed: ERR_AUTHENTICATION_FAILED
Invalid username or password.

Simply uncheck the above checkbox in Hana Studio to gain access to the database.

Side note:
When reporting on SAP BW (no Hana) for every multidimensional database object, OLE/OLAP access had to be activated, in order for the objects to show up on the Tableau side (via NetWeaver connection). Having the correct drivers installed is one thing, allowing Hana/BW to use them properly another.

Missing User-Permissions
Even after successfully connecting to the database, 99% of all occurring problems (or rather configuration steps) are laying on Hana side. After all, SAP Hana remains to be a database with a variety of "add ons" around it. Therefore, the usual DB-configuration applies in this context as well.

A Hana instance always includes the following components
• a system database, and most likely, one or more tenant databases,
• several DB schemas (on each database),
• catalog objects, such as tables and views, and, last but not least,
• users and roles.

As long as you don’t have Single-Sign-On [5] enabled, when connecting to SAP Hana via Tableau, you will get prompted for user credentials. Tableau will then use these credentials to access the Hana Database, irrespectively of the user, that is logged into Tableau. From that point on, the user permissions assigned to those credentials will apply on the database side.

As a setup to test the minimum requirements to do a reporting on Hana tables, I created my user
• SIMONROST
and used the two tables
• World_Indicators
• World_Indicators_Country.

Situation

Existing / stable connection to SAP Hana
Metadata (headers and datatypes) are being shown on Tableau side
Refresh of data impossible

Objects

Schema Tableau
Owner (User) TABLEAU
User thats accessing the database: SIMONROST

Tables
World_Indicators
World_Indicators_Country

1. Missing Object Privileges for table "World_Indicators",

are resulting in the following Tableau behaviour,

when clicking "Update Now"

Unable to complete action
[SAP AG][LIBODBCHDB DLL][HDBODBC] General error;258 insufficient privilege: Not authorized

"Select"-Privileges for the user accessing the table suffice for Tableau to use it on a workheet / dashboard. In my case I tested it with table "World_Indicators_Country":

2. Of course, if the object that you are trying to access consists of more than one table and only one of those is missing select-privilege, the loading will fail, as you need privileges on ALL elements.

Overview and Outlook

If you are familiar with almost any kind of database, none of the above comes as a surprise. And of course, the list of possible sources of error is endless and exceeds the scope of a (even several) blog entry. Yet, if you are planning to use Tableau as your BI-Tool of choice for visualizing SAP Hana data, the above shown cases should have given you a feeling for the manageability of those issues.
The closer you are working together with your db-admin the easier it gets to overcome common errors. In their architectural/organizational blueprints, Tableau suggests the nomination of a "Data Stewart". This role is responsible for creating and publishing data sources and therefor fills the gap between Front- and Backend. If your organization already spend money on SAP Hana and Tableau this would be a budget well spend.
If this blog happens to come across some interest, I will be happy to successively add further items to the list. Of course, feel free to get into touch with me, if you have any questions.

Further information

[1] After registering, you can find the downloader: https://developers.sap.com/topics/sap-hana-express.html
[2] Learn more: https://developers.sap.com/group.hxe-install-vm-xsa.html
[3] https://www.kaggle.com/
[4] Learn more about: https://strategicsap.com/2019/01/great-explanation-and-guidelines-to-finding-the-best-hana-licensing-option-by-saps-jorge-mendes/
[5] Learn more about: https://onlinehelp.tableau.com/current/server/en-us/config_sap_hana_sso.htm

Share this article with others

About the author

Simon arbeitet seit 2016 als BI und Visual Analytics Berater, Projektleiter und Manager bei Woodmark. Im Rahmen seiner Projekte beschäftigt er sich hauptsächlich mit der Implementierung von Blueprint / Red Book Themen bzw. berät Kunden bei der Anbindung ihrer Datenquellen an das Reporting Tool.

Simon is working as a Business Intelligence & Visual Analytics consultant as well as Manager for Woodmark since 2016. As part of his projects he has advised customers of different branches on implementing BI best practices (Blueprint/Red Book) as well as helped integrating different data sources into their reporting environments.

To overview blog posts