Predictive Analysis in SAP Hana
SAP HANA offers a radical new approach to predictive analytic whereby the volume of data that may be analyzed and the speed of the analysis bring a new perspective to predicate analysis.
In database predictive analysis coupled with a modern user interface to define the analysis process and support – the embedding of the analysis process in applications is a powerful combination.
If you want to enrich your career and become a professional in SAP Hana, then visit Tekslate - a global online training platform: "SAP Hana Administration Training" This course will help you to achieve excellence in this domain.
Overview of predictive analysis
Data mining is the exploration and analysis by automatic or semi-automatic means, of layer quantities of data in order to discover meaningful patterns and rules.
The process of data access, data exploration, data prep action, modeling model deployment.
In-Memory data mining & statistical analysis
In their ways to implement in-memory data mining & statistical analysis
(a) SQL Scripts
The SQL script is an asset of SQL extrusions which allow developers to push data-intensive logic into the database in order to avoid massive data copies to the application server and to leverage sophisticated parallel execution strategies of the database
The set of SQL extensions for the SAP HANA databases which allow developers to push data-intensive logic into the database is called SQL script
These extensions are keys to avoiding massive data copies to the application server and to leverage sophisticated parallel execution strategies of the database.
SQL script V2 supports stored procedures, which provides enhanced control flow capabilities and is positioned to be more scriptable for pushing complex parts of application logic to the database.
It can meet some requirements for reporting like join, aggregation, Etc. when it comes to data minify and statistic analysis, SQL script & not suitable for implementing complex algorithms
Through the ‘R’ integration solution, developers can leverage open Source RS 3000+ External packages to perform wide – range data mining and statistic analysis
An open-source software language and environment for statistical computing and graphics with 3000 add – on packages
The packages cover a wide range of topics
- Cluster analysis 4 finale mixture models
- Probability distributions
- Computational econometrics
- Empirical finance
- Statistical generics
- Graphic displays, dynamic graphics graphic devices & visualization
- Machine learning & statistical learning
- Medical image analysis
- Multi variant statistics
- Natural languages processing
- Statistics for the social – sciences
- Time services analysis
(c)BFL (Business Function library)
BFL is the calculation library for the applications built on top of the SAP HANA database. The business functions are written in C++ and executed in a database calculation engine. BFL has a road map for data mining and statistical algorithms.
Usage scenario: 1
Utilize open-source ‘R’ as the data mining calculation engine
The application developer can embedded R scripts in the SQL script.
Sample codes in SAP HANA SQL Script
Create function LR (in input SVCC – PREC – type, OUT OUTPUTO R_COEF _ type)
LANGUAGE R LANG AS ‘’
CHANGE _FREQ <-input $ CHANGE _ FREQ:
SUCC _ PREC <- input $ SUCC – PREC;
Coefs ,- coef (glm (succ _PREC ~ CHANGE – FREQ, family = position));
CHANGE FREQ <- CICFS [ “(CHANGE _ freq”];
RESCSST <- as.data.frace (cbind (INTERCEPT, CHANGE FREQ))
TRUNCATE TABLE r-coef_tab;
CALL LR (SUCC – PREC – tab r-coef – tab);
SELECT* FROM v-coef – tab;
Use open source R’s console to interact with SAP HANA data
The diagram is as will as scenario 1:
File edit view terminal help
Loading required package : DBI
Loading required package: rjawa
>Jdc path ,-“use/sap/HDB/HDBDD/exc/imprsjdbc.jas”
>drv <-JDBC (“com.ptime.sql.Driver”, jdbe path, identifie-identifier.quote= “ ‘ “)
>conn <-db connect (drv, “jdbc : ptime : local host : 300’s;
“system” , “manager”)
>SQL <- “select * from TEST – DATA – INT”
>get data frome (com, SQL, “VAr1”)
To register ‘var1’ with slim ID 3391796252027132
>dim (var 1)
[1[ 10000 100
>var 1$ col 1[1:10]
 1451 1325 1959 1743 885 1484 1293
>resuits <-kmoans (vat2.5)
>results $ size
 2028 2000 2019 1981 1972
>cleanup object (“var1”)
For an Indepth knowledge on SAP HANA, click on below
- Performance Tuning in SAP HANA
- Security in SAP HANA
- Organizing system Landscapes in SAP Hana
- Analytical Privileges in SAP HANA
- Security in SAP HANA
- SAP HANA Views