The SAP HANA predictive analysis library (PAL) has been around for a number of years and is well established. In fact, the SAP HANA Academy has been providing video tutorials for the PAL since the very first release back in 2013 and you’ll find tutorials for each and every one of the 60+ algorithms in the main PAL playlist.

Tradtionally PAL algorithms are invoked as stored procedures created via a “wrapper generator” procedure which called using “classical” SQL.

However SAP HANA continues to evolve at a rapid pace and with the introduction of SAP HANA XS Advanced Model (XSA) and Web IDE for SAP HANA use of classical SQL is not really relevant. This is because we’re using HDI containers rather than “classical” database schemas and we need to be able to deploy applications to other systems (or spaces) easily and without manual intervention.

There’s no need to worry however – PAL is fully supported in XSA and it’s actually quite simple to set up. Rather then using the “wrapper generator” procedure, you simply create HDB AFL language (.hdbafllangprocedure) artifacts within the HDB module of your XSA project. Some might say it’s even easier than using the “wrapper generator” – I guess this probably depends on whether you’re more comfortable with SQL or JSON 🙂

To help you get started I’ve produced a short series of video tutorials that take you through a simple scenario – covering concepts and pre-requisites, setting up an example project, with the HDB AFL language procedures, calling procedures, and even how to invoke the PAL algorithms across HTTP via web services.

Introduction

Create an example MTA project with sample data

Create HDB AFL language procedures to register the PAL algorithms

Create stored procedures that invoke the PAL algorithms

How to call predictive capabilities via HTTP using web services

Code snippets are provided in GitHub so you can follow along easily.

You can also find the above videos in both the XS Advanced and PAL playlists.

If you’d like to see a more involved example that’s part of a realistic end-2-end scenario – take a look at our live5 solution which incorporates PAL clustering.

As always your feedback is most welcome – below, in the YouTube comments section, or on Twitter @pmugglestone.

Have fun!

Philip

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply