SAP

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Try Out Multi-Model Functionality with SAP HANA Cloud Central and Database Objects App

Explore vector, knowledge graph, property graph, JSON document store, and spatial capabilities in SAP HANA Cloud Central.

Overview

You will learn

  • ✔How to create and explore a knowledge graph, a property graph, a document store, and spatial data
Dan van Leeuwen D Dan van Leeuwen October 2, 2026
Created on August 12, 2026
Contributors

More from Dan van Leeuwen

See all 60 tutorials by Dan van Leeuwen →

Prerequisites

  • A productive SAP HANA Cloud database
  • You have completed the first 3 tutorials in this group.

Steps

Overview

The SAP HANA Cloud vector engine enables similarity search using vector embeddings and built in functions.

A knowledge graph can be used to store facts in triples providing additional meaning and relationships.

A property graph can be used to show the connections between items such as the connections between airports or between people or groups in a social network.

SAP HANA Cloud provides the ability to store and perform queries on spatial data such as a point, a line segment, or a polygon.

This tutorial is meant to be an introduction to these topics. For additional content see the tutorial groups Smart Multi-Model Data Processing with SAP HANA Cloud and Introduction to SAP HANA Spatial Data Types as well as the multi-model chapters in Basic Trial - Introduction to SAP HANA Cloud that are available once you sign up for the basic trial.


Step 1 Similarity searches using the vector engine
—

The ability to embed text as a vector and to then use that in a similarity search will be demonstrated in the instructions that follow. A pre-requisite for these steps is to have enabled the Natural Language Processing (NLP) on the advanced settings tab of the instance provisioning or manage configuration wizard.

  1. Open the SQL console and examine the DESCRIPTION column in hte table MAINTENANCE.

    SQL
    SET SCHEMA HOTELS;
    SELECT * FROM MAINTENANCE;

    Maintenance work in the hotels dataset
    Maintenance work in the hotels dataset

  2. Run the SQL below to see an example of the built-in VECTOR_EMBEDDING function that takes a string and converts it to a vector representation.

    SQL
    SELECT VECTOR_EMBEDDING('Roof repair due to storm', 'DOCUMENT', 'SAP_NEB.20240715') FROM DUMMY;
  3. Create a new column in the MAINTENANCE table and populate it with a vector representation of the DESCRIPTION column.

    SQL
    ALTER TABLE MAINTENANCE ADD (V_DESCRIPTION REAL_VECTOR GENERATED ALWAYS AS VECTOR_EMBEDDING(DESCRIPTION, 'DOCUMENT', 'SAP_NEB.20240715'));
    
    SELECT * FROM MAINTENANCE;

    Added a vector column
    Added a vector column

  4. Use the new V_DESCRIPTION column in a similarity search (COSINE_SIMILARITY).

    SQL
    SELECT TOP 1 COSINE_SIMILARITY(V_DESCRIPTION, TO_REAL_VECTOR(VECTOR_EMBEDDING('shingles', 'DOCUMENT', 'SAP_NEB.20240715'))) AS SCORE, * 
        FROM MAINTENANCE ORDER BY SCORE DESC;
    SELECT TOP 1 COSINE_SIMILARITY(V_DESCRIPTION, TO_REAL_VECTOR(VECTOR_EMBEDDING('swim', 'DOCUMENT', 'SAP_NEB.20240715'))) AS SCORE, *
        FROM MAINTENANCE ORDER BY SCORE DESC;
    
    --Optionally remove the added EMBEDDING column
    ALTER TABLE MAINTENANCE DROP (V_DESCRIPTION);

    Similarity search
    Similarity search

For further details, see SAP HANA Cloud, SAP HANA Database AI Development Guide, Creating Text Embeddings with NLP, and Similarity Measures.

Step 2 Enable the triple store and create a knowledge graph (optional)
+
Step 3 Create a property graph workspace
+
Step 4 Explore a property graph using the viewer
+
Step 5 Use property graph algorithms
+
Step 6 Create, populate, and query a JSON collection (optional)
+
Step 7 Import a JSON collection using the hana_ml.docstore package (optional)
+
Step 8 Import spatial data
+
Step 9 Use spatial functions in a query
+
Step 10 Knowledge check
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 10
1. Similarity searches using the vector engine 2. Enable the triple store and create a knowledge graph (optional) 3. Create a property graph workspace 4. Explore a property graph using the viewer 5. Use property graph algorithms 6. Create, populate, and query a JSON collection (optional) 7. Import a JSON collection using the hana_ml.docstore package (optional) 8. Import spatial data 9. Use spatial functions in a query 10. Knowledge check
Next