Skip to Content
Author's profile photo Philip MUGGLESTONE

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?

GRAPH 03.PNG

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:


Getting Started


Create Graph Workspace

Graph Viewer:

Overview of Graph Viewer

Neighborhood Search

Neighborhood Search with Parameters

Strongly Connected Components

Shortest Path

Pattern Search

Graphical modeler in XS Advanced and SAP Web IDE for SAP HANA:

Getting Started

Create Project

Create Graph Workspace

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

Assigned tags

      9 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo V. Hariharan
      V. Hariharan

      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

      Author's profile photo Philip MUGGLESTONE
      Philip MUGGLESTONE
      Blog Post Author

      Hi Venkat,

      Graph processing was formally released as GA in SPS12.

      Anything prior to that was just a preview.

      Thanks,

      Philip

      Author's profile photo Benedict Venmani Felix
      Benedict Venmani Felix

      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?

       

       

      Author's profile photo Philip MUGGLESTONE
      Philip MUGGLESTONE
      Blog Post Author

      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

      Author's profile photo Benedict Venmani Felix
      Benedict Venmani Felix

      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

      Author's profile photo Jon Gooding
      Jon Gooding

       

      Just as a followup Benedict Venmani Felix I had this issue when on SP12. Works fine on HANA2 SP00 and SP01

      Cheers

      Jon

      Author's profile photo Benedict Venmani Felix
      Benedict Venmani Felix

      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.

      Author's profile photo Amit Pimple
      Amit Pimple

      SAP HANA graph needs SAP HANA enterprise or platform edition?

      Author's profile photo Philip MUGGLESTONE
      Philip MUGGLESTONE
      Blog Post Author

      Platform Edition