Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
4,703

Last update: 12.01.2022  


The SAP HANA smart multi-model offering includes a powerful Graph engine that allows analyzing complex relationships in business data stored in the SAP HANA database. Through Graph data processing, applications can easily be enhanced with insights based on methods like Pattern Matching or Network Analysis.


This blog post aims at providing a comprehensive overview of the most recent enablement materials on that topic. It’s meant to be a living document, so we’ll try to keep it as up to date as possible.

The links are structured as follows:

  • Getting started– Your first steps with the Graph engine in SAP HANA

  • Python interface for graph data processing – Our native integration of Graph processing in SAP HANA with the Python scripting language

  • Graph use-cases – Introduction and deep-dives into core Graph features

  • Multi-model use-cases – Combined use of the Graph engine together with other engines from the SAP HANA smart multi-model family

  • Technical documents and code samples – Ready-to-run code snippets and detailed documentation of all the features.


In case you need a system for evaluating the Graph capabilities of SAP HANA, the fastest way to get started is a free trial instance of SAP HANA Cloud. The Graph engine comes out of the box and is ready for usage without further configuration.



 

Getting started


If you are just about to take your first steps with Graph data processing in SAP HANA, our sessions from the Devtoberfest will provide you with a good starting point, to familiarize with the topic.

You may also want to check out the demo videos from the SAP HANA Academy, to see the Graph engine in action, both

To get first hands-on experience, follow the beginners’ tutorials on our Developer Center:

A broader overview of the Graph technology in SAP HANA is provided by Maxime Simon, covering all major aspects that you might want to consider when diving into this topic. Use this as your entry into the world of Graph data processing with SAP HANA.

If you are used to working with the Cytoscape network analysis client, there is good news: We have a plugin for that, to work natively with SAP HANA. Learn more about it in this post:



 

Python Interface for Graph data processing


As for the Spatial and Machine Learning features in SAP HANA, Graph also provides a native interface to the Python scripting language, via the hana_ml package, developed by SAP.

Markus Fath gives you an initial introduction to this Python integration:

Witalij Rudnicki has put together a series of six blogs posts on the use for the hana_ml package for multi-model use-cases, starting with this article:

For Graph scenarios, pay special attention to

Markus provides another very detailed walk-through of how to use the Python API for modern multi-model data science. In this example, he demonstrates the use of most of the Graph processing techniques available in SAP HANA, also highlighting our most recent enhancements to the Python API.



 

Graph use-cases


Markus also wrote a comprehensive article on network tracing using Graph processing in SAP HANA. Using the example of a directed graph of software dependencies, he showcases how to realize basic analysis steps like Reachability Analysis or calculation of Hop Distance and Spanning Trees. This is followed by more complex fine-tuning like working with a Limited Traversal Depth or Filter and Stop Conditions.

Umang Rawat deep-dives into the topic of path finding in networks, paying special attention to shortest-path techniques. He also provides you with important considerations regarding performance for mass-calculations of that kind.

Witalij dedicated two more articles on the topic of neighborhood analysis using GraphScript. It is based on the SFLIGHT dataset of airports and flight connections:

SAP HANA Graph may not only be used to analyze external data, but also the database instance itself. Markus demonstrates, how to utilize the graph engine to explore lineage in SAP HANA database objects.

Staying in the SAP universe, Antonio Maradiaga discusses the possibility to gain an overview of the SAP product portfolio using the Graph engine in SAP HANA to capture, maintain and analyze the product relationships. Of course, that would work for any other product catalog as well.

Also Naveen Kumar Chikkanna is working in the domain of product relations when showcasing how to use Graph networks to handle Master Data Substitution. This technique is used to determine product substitutes and provides alternatives in out-of-stock situations.



 

Multi-Model Use-Cases


The true power of a multi-model database like SAP HANA becomes real, when we build solutions based on two or more of the data types and/or engines. One of the most common combinations is the Graph engine joined with Spatial data and calculations, like in finding optimal paths or routes in a map, based on certain restrictions in the terrain.

Rafael Pacheco and Mathias Kemeter have two great examples. In his article Rafeal showcases how to find optimal paths, based on hexagonal clustering of the Spatial data and specific ratings for each of the cluster cells. This use case is based on the real-life application of this technique for finding safe evacuation paths in a case of a wildfire.

Mathias’ article aims for a similar result but uses Voronoi cells to achieve a higher degree of optimization in keeping distance from certain hazardous areas.

Another joint application of the Spatial and Graph engines is the calculation of isochrones – areas that are reachable within a certain time threshold from a given start point. Markus shows how to realize this with SAP HANA.

In a recent example, Markus also demonstrates how to use the two engines to map and analyze the load and associated risks in a Stormwater Network.



 

Technical Documents and Code Samples


You can find ready-to-run script examples for Graph processing with SAP HANA in the Github repository:

The official documentation for all features can be found here:

If you are into building custom algorithms using the GraphScript language in SAP HANA, you can find a cheat sheethere with frequently used features und syntax details:



 

Thank you!


I would like to thank all the above contributors for their tremendous effort and time to create these valuable materials!

As said in the introduction, this article will receive updates any time new relevant content gets created. If there is anything you miss in this collection (either because we missed it or because there is no resources on your specific topic), do not hesitate to reach to ruediger.karl (SAP HANA Product Management) or matthias.menz (SAP HANA Solution Management).

Also, we are happy to take your feedback, thoughts or questions in the comment section below!