Skip to Content

W3C Semantic Web Standards with HANA – RDF/SPARQL Support

Currently I’m involved in a project exploring the semantic technologies for providing situation and context awareness services for future human computer interfaces. We decided to use a graph-based approach for storing the user’s situation and exploit Linked Data [1] principles to collect related information from different sources to derive recommendations for user assistance. Unfortunately SAP does not have

With HANA, SAP provides a fast and scalable data layer based on innovative column-based, in-memory storage and query engines. So the question was, whether this new technology can be utilized for implementing W3C Semantic Web [2] technologies, such as RDF store, SPARQL [3] efficiently. Many vendors use relational databases for their SPARQL implementations or provide the possibility to use relational databases as storage backend. So I spend some time on the problem of using HANA as an RDF triple store and implementing a SPARQL endpoint for querying graph data in HANA. What came out of this activity is a proof-of-concept implementation of SPARQL 1.1 in pure JavaScript (node.js [4] ), which translates SPARQL statements into HANA SQL and SQLScript functions and executes these queries on a HANA instance. Although concrete performance measuring and comparison was not yet done, the results are very promising and we use the system for our project now.

Besides the performance aspect we discovered a few other benefits, which come with HANA. So for example, it is possible to define HANA SQL Views to directly access the enterprise data within SPARQL queries and such provide a graph view on enterprise data. No replication of data into a special triple store is necessary. Furthermore, together with the Virtual Data Model or CDS these views can also be created automatically.

Screenshot from 2014-10-09 17:35:18.png

Sample query of a business object “PurchaseOrder”

The full-text search and text analysis features of HANA can be integrated into the SPARQL processor. For example we implemented a built-in RDF property , which uses the HANA contains [5] predicate for fuzzy search.

Finally, another interesting possibility comes with HANA Virtual Tables, which refer to tables on a different (remote) HANA databases. This feature allows to implement graphs spanning multiple databases and execute federated queries.

We are now using and improving the HANA SPARQL extension in the context of speciifc internal projects. The Website lists a number of industry verticals [6]. So I’m wondering if there is a demand for having RDF/SPARQL support for HANA inside the SAP community.

[1] Linked data – Wikipedia, the free encyclopedia, Data – W3C,

[2] Semantic Web – Wikipedia, the free encyclopedia

[3] SPARQL – Wikipedia, the free encyclopedia and SPARQL 1.1 Overview

[4] node.js

[5] The CONTAINS() Predicate – SAP HANA Fuzzy Search Reference – SAP Library


Screenshot from 2014-10-09 17:35:18.png
You must be Logged on to comment or reply to a post.
  • Interesting thanks for that. Out of interest, did you use the open source SPARQL parser by Ruben Verborgh for JS or did you write one on your own?

    We also use Linked Data with SAP, for that we created a SAP Linked Data Connector. This connector allows a SAP ERP system to take part in the enterprise semantic web cloud. RESTful HTTP request are transposed into SAP function calls. The response gets wrapped into a RDF graph. The mapping of the SAP ids and fields into RDF nodes can be customized in a very flexible way.

    We still do SPARQL outside of SAP ERP but it's a great way to connect SAP data with other silos.

    • THe parser is based on a pegjs grammar from Antonio Garrote, which I modified to capture SPARQL 1.1, I didn't notice that there is a new parser from Ruben. Thanks, for the hint, The pegjs parser is not so easy to produce meaningful error messages.

      Thanks for your interest! I'm really interested to hear about your use cases for Linked Data applications includig SAP systems. Would it help to have SPARQL as part of HANA?

      • In my opinion it helps having SPARQL on pretty much everything so yes, also on HANA 🙂

        The customers we talk to don't have data in HANA so our goal was to give access to all the content in SAP ERP. Linked Data is useful because it allows us to link data from various sources in an official, W3C format. So we can use it as a non-proprietary data warehouse format and SPARQL is the query language for it. The more system directly expose RDF and SPARQL the less work we need to do to get the big picture. This will allow us to build new kind of business intelligence systems which leave a lot of the data where they are and make the whole ETL processes far less complex and more flexible.

      • Torsten Leidig wrote:

        Would it help to have SPARQL as part of HANA?

        I would be very happy to see that!

        There are a few SAP researchers that worked on something related to it: Andreas Friesen, Jens Lemcke, Daniel Oberle and Tirdad Rahmani[1]. That was a couple of years ago, though, so I have no idea if they continued that line of work

        [1] Ontology-Driven Software Development

        • Thanks for the pointer. I know the people you mention. SAP was involved in several semantic web projects in the past, not only software development. So I wonder what happened to all these endeavors. I worked in a different research area at this time. However, it might be work to ask the people how it went further with their research.

    • We are still in the prove of concept phase. Currently we investigate performance with respect to large scale data. So far it looks very good.

      At the current stage I'm not entitled to give any statements about availability or integration into future products or services.

    • It depends. I currently preparing a service in the HANA Cloud Platform HCP.

      What do you want to do? Are you somehow afiliated with SAP?

      You can send me your plans via private Mail and we will see what we can do.

  • We're interested in using ontology in our project, so I was wondering, how close your project is. Is it a triple store? Does it support RDF knowledge representation languages, such as OWL, TURTLE, RDFS? Does it support named graphs? Does it support full blown SPARQL as a query language?

    The more general question is - how ready your project is for productive use?