GithubHelp home page GithubHelp logo

pandulis / hana-graph-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sap-samples/hana-graph-examples

0.0 2.0 0.0 41.93 MB

SAP HANA includes a graph engine for network analysis. The examples demonstrate the usage of built-in algorithms, e.g. for path finding.

Jupyter Notebook 97.30% Python 2.70%

hana-graph-examples's Introduction

REUSE status

SAP HANA Graph Examples

SAP HANA includes a graph engine for network analysis. The examples demonstrate the usage of built-in algorithms, e.g. for path finding.

Description

SAP HANA's built-in graph algorithms, e.g. for shortest path finding, can be invoked within database procedures. The procedures are called from SQL, which is a nice way to integrate graph processing with relational. The sample procedures included in this repository help you understand the power of the language and also provide code snippets and reuse templates.

Self-contained scripts are in the GRAPH_PROCEDURES_EXAMPLES folder. You'll find templates for the built-in algorithms, e.g. BFS, and templates for common algorithms like closeness centrality.
A more advanced script, specifically related to different variants of path finding, is based on a flight routes dataset OPENFLIGHTS.
Using the POKEC dataset, there is a script we used to benchmark sequential vs. parallel execution of 1000 shortest path queries. It serves as a template for using the MAP_MERGE operator to parallelize graph queries.
In October 2020 the SAP HANA Python Client API was enhanced and now includes functions to leverage HANA's Graph engine. If you are a data scientist working in python take a look at the Jupyter Notebook that demonstrates the use of the graph extensions on the London street network.
Also using London street network data, there is a script that demonstrates how to calculate isochrones using the graph engine's built-in shortest path one-to-all algorithm and some HANA-native spatial post processing.

Requirements

In order to run the examples yourself you need a SAP HANA Cloud system and a basic understand of SQL. To get a system yourself, just register for a trial. Once set up and connected, you just need to open the SQL Editor of the SAP HANA Database Explorer and run the statements in the script. Some of the examples are self-contained, others are made for external datasets (e.g. https://openflights.org/data.html) which can be downloaded and imported into HANA tables.

Download and Installation

The .sql scripts can just be copied to a SQL Editor and executed.

Limitations

Some parts of the scripts may not run on older versions of SAP HANA Cloud - just make sure your system is up-to-date.

Known Issues

None.

How to obtain support

This project is provided "as-is" - there is no guarantee that raised issues will be answered or addressed in future releases.

Contributing

At this point, the repository is maintained by SAP only. External contributions will not be considered. However, you are welcome to open a bug report.

To-Do (upcoming changes)

We plan to include additional examples and a ready to deploy HANA database module later.

License

Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

hana-graph-examples's People

Contributors

fath-markus avatar btbernard avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.