SAP’s Predictive Analysis allows users to leverage the HANA PAL (Predictive Analysis Library) while connected to HANA in an online mode. This results in a user friendly interface which still allows you to push the processing to the HANA server. The PAL is not installed on HANA by default so I’ll show below one way in which it can be installed. I’ve used Rev 60 of HANA for this guide.
Check if the AFL is installed:You should first check if AFL (Application Function Library which includes PAL) is installed on your HANA server. To do this, log in to your HANA server in HANA Studio. Then open a SQL console and run the following commands:
SELECT * FROM
“SYS”.”AFL_AREAS” WHERE SCHEMA_NAME = ‘_SYS_AFL’ AND AREA_NAME = ‘AFLPAL’; SELECT * FROM
“SYS”.”AFL_PACKAGES” WHERE SCHEMA_NAME = ‘_SYS_AFL’ AND AREA_NAME = ‘AFLPAL’; SELECT * FROM
“SYS”.”AFL_FUNCTIONS” WHERE SCHEMA_NAME = ‘_SYS_AFL’ AND AREA_NAME = ‘AFLPAL’; If results get returned then you already have AFL installed (image below shows a HANA server with the AFL successfully installed).
Install AFL:If you don’t have the AFL installed, follow the steps below to install (you can download the AFL from http://service./swdc)
~/tmp/SAP_HANA_AFL #./hdbinst
SAP Application
Function Libraries installation kit detected. SAP HANA Database
Installation Manager – SAP AFL Installation 1.00.60.379371 ****************************************************************************
Enter SAP HANA
system ID: HVN Enter System
Administrator Password: Checking
installation… Preparing package
“AFL”… Installing SAP
Application Function Libraries to /sapmnt/HVN/exe/linuxx86_64/plugins/afl_1.00.60.379371_1147257… Installing package
‘AFL’ … Stopping system…
Activating plugin…
Starting system…
Installation done
Log file written to
‘/var/tmp/hdb_afl_2013-07-29_16.12.49/hdbinst_afl.log’. Check if AFL__SYS_AFL_AFLPAL_EXECUTE has been granted to the user who will be running the predictive models:Grant AFL__SYS_AFL_AFLPAL_EXECUTE if the user doesn’t have it:NOTE: there are two underscores _ between AFL and SYS.
You can grant the option through the GUI or run a SQL statement similar to the following where MyHANAUser is the username you wish to give access to:
grant AFL__SYS_AFL_AFLPAL_EXECUTE to MyHANAUser;
Check if you already have the afl_wrapper_generator and afl_wrapper_eraser procedures and access to run them:Below we can see the procedures do indeed exist:
Here we can see that user I817307 has access to the procedures:
Add the afl_wrapper_generator and afl_wrapper_eraser procedures if they don’t exist:
Check if you’ve enabled the Script Server.Next you’ll need to check if you have enabled the Script Server. To do this, go to the administration view of your SAP HANA system in Studio. Under Configuration | daemon.ini |scriptserver, you’ll need to check if the value is 0 or 1. 0 indicates you have not enabled the server.
Below we can see the server is indeed enabled.
Enable the Script Server if it wasn’t already in the step above:To enable, follow Note 1650957 – SAP HANA Database:Starting the Script Server.
I personally used method B in the above note.
Please note, it’s important to TAKE A COMPLETE BACKUP as mentioned in the note.
You may need to restart your HANA instance after going through the steps.
That’s it – you have configured PAL for use by SAP Predictive Analysis! To begin using it, perform the following steps:
2. Select an appropriate algorithm from the Predict tab (HANA Apriori for example): 3. Follow the usual steps you would to run a predictive analysis. |
|