Connecting SAC to HANA Cloud the Easy Way – Using Application Studio to Deploy the HAA (Hana Analytics Adapter)
With SAP Analytics Cloud Wave 2020.20, this manual configuration is no longer required.
Please see the vastly simplified Three click method.
Warning, the steps below are only required if you do not have the new connection type.
Having previously deployed the HANA Analytics Adapter (HAA) I thought it was worth sharing the latest and greatest method. SAP Analytics Cloud receives live data from HANA Cloud using InA (Information Access) protocol. Previous the XS Engine provided this, but this is not part of HANA Cloud, we therefore need the HAA to provide this.
If you are lucky enough to have access to HANA Cloud, chances are you will want to connect that live to SAP Analytics Cloud aka SAC.
The SAP HANA Journey site now has a complete tutorial that also shows how this can be configured. Additionally the official SAP help documentation can be found here for Set up Live Connectivity to SAP HANA on SAP Cloud Platform and the SAC Guided playlist is here SAP HANA HDI in SAP Cloud Platform Cloud Foundry (live).
Finding this information can be hard, it is often good to refer to a text/static version so I have captured the steps in this blogpost.
The are 6 main parts to connect SAC to HANA Cloud
- Access the Business Application Studio
- Hana Analytics Adapter Configuration
- Create Role Collection
- Assign Role to Cloud Platform Users
- Verify Access to InA using Application URLs
- SAP Analytics Cloud Connection
- SAP HANA Cloud with an HDI Container created
- SAP Analytics Cloud
- Business Application Studio
1. Access the Business Application Studio
You need to have quota, the subscription enabled and the role collections assigned to your user (Trust Configuration: SAP ID Service – Role Collection Assignment).
Full details of how to provision the App Studio the first time can be found here. https://developers.sap.com/tutorials/appstudio-onboarding.html
If you prefer a video, Philip also created one for that too. SCP Onboarding: Provision Services – Subscribe to SAP Business Application Studio
With the Business Application Studio available, you should launch App Studio from the subaccount, subscriptions.
Click Go to Application.
Login to the Business Application Studio with your Cloud Platform credentials
Create a New Dev Space with the application type as SAP Cloud Business Application
After creating the Dev Space, we can click on the name to enter it.
2. Hana Analytics Adapter Configuration
Now we are inside our space in the Business Application Studio we can configure the HAA (Hana Analytics Adapter). The clever people from the SAP HANA Academy have created an npm we can use.
Open a New Terminal
Type the npm install command into the Business Application Studio Terminal.
npm install -g generator-saphanaacademy-haa
Execute the installed package, with yo.
cd projects yo
For the curious ones the npm package source code is hosted on the HANA Academy GitHub Repo
Choose saphanaacaademy Haa
The HDI container name can be quite ugly if it is generated. The HDI Container name is controlled by the parameter service-name in the WebIDE mta.yaml project.
Complete the generator/wizard
The host of the Client Application is the full SAC tenant name without https://
? What project name would you like? haa ? Would you like to create a new directory for this project? Yes ## You are binding the HAA to this HDI Container, multiple can be added later if required ? What is the name of your HDI container? covid-nhs ? What is the host of your client application? my-sac-tenant.eu10.sapanalytics.cloud ## Yes = SSO to DB, No = HDI Container user used for DB connection ? Will you be configuring SSO (implies shadow users in HANA)? No ? Would you like to add multi-tenant SaaS application support? No
Upon completion, open the newly created project.
Click the link to download the SAP HANA Analytics Adapter release version WAR file from.
Current file version is xsahaa-release-1.6.1-release.zip
Extract the downloaded xsahaa-release-1.6.1-release.zip
Drag and drop the file java-xsahaa.war into the project srv/target directory.
We can now select Build MTA on the mta.yaml file
When the build completes check the Task build log shows something similar to below with
BUILD SUCCESS. The log should open automatically.
Once successfully built we should see the MTA archive folder with the .mtar file inside.
We can now select the haa_0.0.1.mtar, right click and choose Deploy MTA Archive
You should be prompted to login to your SCP API Endpoint. Something similar to below. You can then see the organisation and space.
3. Create Role Collection
After successful deployment we will have a 1 new application, 2 new services and 1 new role.
These can be seen in the Cloud Platform Cockpit, Subaccount.
Create a New Role Collection
Click the HAA Access role created.
Add Role to the Role Collection.
4. Assign Role to Cloud Platform Users
Type in the users email address that you wish to assign the role to.
Click Show Assignments
Click Assign Role Collection
Select the HAA Access Role Collection
5. Verify Access to InA using Application URLs
We can see our new application URLs, by navigating to the Cloud Platform space Applications.
The Base URL (Application Route) is shown after selecting the haa app.
Click the URL to open the base HAA page, no authentication is required yet.
# Heartbeat URL Path /sap/bc/ina/service/v2/HeartBeat
## GetServerInfo URL Path /sap/bc/ina/service/v2/GetServerInfo
6. SAP Analytics Cloud Connection
We can now establish a Live Direct connection to HANA Cloud, using the SAP HANA connection option.
For the Authentication method SAML appears to be correct but basic User Name & Password may also connect.
Currently the HAA is a necessary evil that is required to connect from SAC to HANA Cloud. Hopefully this blog post has shown that by using the Business Application Studio this configuration is becoming easier.