Hands-on video tutorials for SAP HANA Graph
Hi,
Graph processing is a hot topic right now – especially since it enabled investigative journalists to uncover the world’s biggest offshore banking scandal. Commonly referred to as the “Panama Papers”, graph processing allowed investigators to sift through a 2.6 terabyte morass of data incorporating 1,400 offshore tax havens and 100,000 companies in order to reveal hitherto unknown connections.
Did you know that SAP HANA includes a native in-memory graph processing capability?
To quoteMichael Eacrett‘s recent blog covering what’s new in SPS 12:
“SAP HANA graph data processing is now generally available, providing the processing capabilities help customers extract deeper insights from hyper-connected data and their relationships. SAP HANA includes a graph engine with built-in graph algorithms (neighborhood search, shortest path, strongly connected components, pattern matching) to find connections without manually creating complex JOIN statements. It also introduces a Property Graph model with flexible schema, which enables users to traverse relationships without the need for predefined modeling. It also comes with a graph viewer tool (for quick visualization and dynamic interaction (i.e. change algorithm parameters) with graph data real-time, and a graph modeler tool that is (integrated with SAP Web IDE for SAP HANA to create and consume graphs visually instead of via SQL or SQLScript.“
So you’re raring to get going with graph processing but don’t know where to start? Well that’s where the SAP HANA Academy comes in…
With nearly two hours of hands-on video content, the new SAP HANA Academy playlist covering SAP HANA graph data processing provides tutorials that cover everything from a chalkboard overview and introduction, to downloading, installing, and working with the graph viewer tool, to enabling graph processing inside calculation views via the graphical modeler based on XS Advanced and SAP Web IDE for SAP HANA.
Here are direct links to all of the video tutorials published so far:
Graph Viewer:
Neighborhood Search with Parameters
Graphical modeler in XS Advanced and SAP Web IDE for SAP HANA:
Calc View – Strongly Connected Components
Calc View – Neighborhood Search
Calc View – Neighborhood Search with Parameters
Alternatively, here’s the main playlist on YouTube: SAP HANA Academy – Graph
The code samples used in the videos are available here: https://github.com/saphanaacademy/Graph
If this has whetted your appetite in other new stuff in SPS 12 do check out the following playlist: SAP HANA Academy – What’s New in SPS 12
All feedback welcome – in the comments section below, @pmugglestone or mailto:HanaAcademy@sap.com.
Happy graph processing!
Philip
Hi Philip,
is there a possibility to work on Graph model on SPS10 ? As per SAP , it is generally available from SPS10. I had only activated the parameter graph_engine in our system which is on SPS10.
Regards
Venkat
Hi Venkat,
Graph processing was formally released as GA in SPS12.
Anything prior to that was just a preview.
Thanks,
Philip
Hi Philip,
I tried the example given in the graph reference guide in both SAP HCP trial(1.00.122.04) and our on-premise HANA system(1.00.122.04).
While executing the "CREATE PROCEDURE....LANGUAGE GRAPH...." , I get this error:
SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near "GRAPH": line 2 col 10 (at pos 97).
Can you please help me understand what the problem might be?
Hi Benedict,
It's difficult to say without seeing the code, but graph script syntax changed between HANA 1.0 SPS12 and HANA 2.0 SPS00. Your systems look to be SPS12 but the code from the reference guide may well be for HANA 2.0?
Also, I recall there was an issue with one of the graph script examples in the reference guide so a corrected version was posted here: https://github.com/saphanaacademy/Graph/blob/master/Code%20Snippets/GRAPH%2016%20GraphScript.sql
Can I suggest to take a look at this video - in particular the comment 3 minutes in: https://www.youtube.com/watch?v=ddfRBiV2c6Y&list=PLkzo92owKnVwCuJeNPcC7J_v4eT5_s6-d&index=10
Thanks,
Philip
Thanks Philip. Even for a simple one line code I am getting the same error:
CREATE PROCEDURE "GREEK_MYTHOLOGY"."TEST" (OUT cnt INT)
language GRAPH READS SQL DATA AS
BEGIN
Graph g = Graph("GREEK_MYTHOLOGY",GRAPH);
cnt = :cnt + 1;
end
The graph_engine property of indexserver.ini is also enabled for system
Just as a followup Benedict Venmani Felix I had this issue when on SP12. Works fine on HANA2 SP00 and SP01
Cheers
Jon
Thanks Jon. So this works from HANA 2.0
Unfortunately the very first video in this series mentions SPS12 and I thought it would work in my system.
SAP HANA graph needs SAP HANA enterprise or platform edition?
Platform Edition