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.
Code snippets are provided in GitHub so you can follow along easily.
As always your feedback is most welcome – below, in the YouTube comments section, or on Twitter @pmugglestone.