What’s New for R Integration in HANA 2.0 SPS03
SPS03 introduces a couple of interesting new capabilities to R Integration for SAP HANA…
Firstly, it’s now possible to create your remote sources interactively via the Database Explorer (in addition to using SQLScript of course!):
Watch this video tutorial to see the this in action: Getting Started with SPS03
Secondly, the SQLScript Plan Profiler has been introduced and makes detailed performance statistics available for stored procedures and functions. This can help you identify performance bottlenecks in your applications.
What’s really nice is that R integration (RLANG) is fully supported – so you can use this capability with your R procedures:
You can use a hint on the procedure call to see results immediately:
CALL "R_CLUSTER" ("DATA", "PARAMS", "RESULTS") WITH OVERVIEW WITH HINT(SQLSCRIPT_PLAN_PROFILER);
Results look something like this:
Or you can turn profiling on/off for a given procedure and results are stored and available via a system view:
ALTER SYSTEM START SQLSCRIPT PLAN PROFILER FOR PROCEDURE "RUSER"."R_CLUSTER"; SELECT * FROM "M_SQLSCRIPT_PLAN_PROFILERS"; -- call the procedure directly in your application SELECT * FROM "M_SQLSCRIPT_PLAN_PROFILER_RESULTS"; ALTER SYSTEM STOP SQLSCRIPT PLAN PROFILER FOR PROCEDURE "RUSER"."R_CLUSTER"; ALTER SYSTEM CLEAR SQLSCRIPT PLAN PROFILER FOR PROCEDURE "RUSER"."R_CLUSTER";
Watch this video tutorial to see this in action: SQLScript Plan Profiler
If you’re interested to learn about what’s new with HANA 2 SPS 03 in general check out the following playlist.
Have fun with R and HANA!
The SAP HANA Academy provides free online video tutorials for the developers, consultants, partners and customers of SAP HANA.
Topics range from practical how-to instructions on administration, data loading and modeling, and integration with other SAP solutions, to more conceptual projects to help build out new solutions using mobile applications or predictive analysis.
For the full library, see SAP HANA Academy Library – by the SAP HANA Academy
For the full list of blogs, see Blog Posts – by the SAP HANA Academy