• No results found

Describing Graph Processing

In document HA100SPS12 (Page 105-113)

LESSON OVERVIEW

This lesson introduces graph processing with SAP HANA and how it plays a key role in data modeling.

LESSON OBJECTIVES

After completing this lesson, you will be able to:

Describe graph processing with SAP HANA

Graph Modeling

Graphs are used to model data when it is best represented using a network. For example, logistics and transportation, utility networks, and social networks. The basic idea behind graph modeling is that it allows a modeler to easily define a series of entities (nodes) and link them in a network that represents how they relate to each other. Graph models can indicate flow direction between entities so that additional meaning can be added to the network and traces can be made. Imagine a complex supply chain mapped using a graph, where all manufacturers, suppliers, distributors, customers, consumers are all represented with information stored along the connections. But why would you want to define such models?

The benefit is that it is easy to develop applications that can traverse huge graphs at speed so you can ask questions such as:

How many hours has the product traveled between two specified points in the network?

Where are all the possible points of origin of this product?

Describe the entire journey of a product by listing all of the stop off points.

Graph processing allows us to discover hidden patterns and relationships in our data and all in real time.

Figure 73: Example Graph Model

The example in the figure, Example Graph Model, is one that most people can relate to, but there are many other interesting examples such as:

Medical — create a network of patients, conditions, treatments, and outcomes for re-use in diagnosis and planning treatments of other patients.

Social network — using popular social media portals, find your customers and their friends, friends of friends, and likes or dislikes to create marketing opportunities.

Although it is possible to use standard SQL data definitions and query syntax to create and process a similar model, it would be extremely complex both in the definition of the model and also the SQL needed for the querying of the graph, plus processing times could be

challenging. SAP HANA Graph provides tools for graph definition and language for graph processing in order to ensure that model development is more natural and simplified and the processing is flexible, and of course optimized for in-memory processing.

Graph Modeling with SAP HANA

The key objects in a graph model are the vertices and edges. Vertices are stored in tables and represent the members of the graph — these are the nodes. The edges are also stored in tables and describe the lines between the members. Along each line we can store connection information such as distance, preference, strength, and so on. To get started with SAP HANA Graph you first need to create and fill the vertices and edge tables with data. You then create a Graph Workspace that refers to the vertices and edge tables. The Graph Workspace simply creates the metadata that defines the graph model and how the vertices and edge tables relate. No actual business data is stored in a Graph Workspace.

The Graph Viewer is a native SAP HANA application that provides an interface to interact with and visualize graph workspaces in SAP HANA. SAP HANA Graph Viewer is an additional tool for SAP HANA Graph that can be downloaded from the SAP Software Download Center.

Lesson: Describing Graph Processing

Figure 74: SAP HANA Graph Viewer

SAP HANA Graph provides a native processing language for graph query and manipulation called WIPE (weakly structured information processing and exploration). It is a declarative language very similar to SQL and contains special keywords to allow easy graph query questions to be formulated such as, how far?, how deep?, what’s the source?, where is the end point? Where is the strongest connection?, and what is the shortest path?

SAP HANA Graph utilizes a dedicated graph engine that works with the other data processing engines in SAP HANA. SAP HANA Graph processing can be combined with all other types of SAP HANA data processing such as textual, spatial, and predictive so that sophisticated and innovative applications can be developed on any data types.

LESSON SUMMARY You should now be able to:

Describe graph processing with SAP HANA

Unit 3

Learning Assessment

1. Why do we model in SAP HANA?

2. Which SAP applications does SAP HANA Live support?

Choose the correct answers.

X A SAP S/4HANA X B SAP ERP

X C SAP Business One X D SAP CRM

3. The virtual data model for SAP S/4HANA is based on which of these?

Choose the correct answers.

X A ABAP CDS X B SAP HANA Live X C ABAP

X D SAP HANA CDS

4. How would you most likely represent the location of an ATM in a visual application that uses SAP HANA spatial processing?

Choose the correct answer.

X A Multi-polygon X B Polygon X C Line X D Point

5. With fuzzy search, when I enter ‘, what does SAP HANA return?

Choose the correct answer.

X A Words that are closely matched in spelling X B Words that are closely matched in meaning

6. Which open source language do you use to create custom predictive algorithms?

Choose the correct answer.

X A R X B L X C C++

X D ABAP

Unit 3

Learning Assessment - Answers

1. Why do we model in SAP HANA?

To  develop  consumption  ready  views  of  business  data  and  to  push  the  data  intensive processing tasks to SAP HANA

2. Which SAP applications does SAP HANA Live support?

Choose the correct answers.

X A SAP S/4HANA X B SAP ERP

X C SAP Business One X D SAP CRM

3. The virtual data model for SAP S/4HANA is based on which of these?

Choose the correct answers.

X A ABAP CDS X B SAP HANA Live X C ABAP

X D SAP HANA CDS

4. How would you most likely represent the location of an ATM in a visual application that uses SAP HANA spatial processing?

Choose the correct answer.

X A Multi-polygon X B Polygon X C Line X D Point

5. With fuzzy search, when I enter ‘, what does SAP HANA return?

Choose the correct answer.

X A Words that are closely matched in spelling X B Words that are closely matched in meaning

6. Which open source language do you use to create custom predictive algorithms?

Choose the correct answer.

X A R X B L X C C++

X D ABAP

UNIT 4 Data Provisioning in SAP HANA

Lesson 1

Describing SAP HANA Data Provisioning 110

Lesson 2

Describing Data Provisioning Tools 113

Exercise 3: Replicate Data Using SLT 119

Exercise 4: Import a flat file into SAP HANA 131

Lesson 3

Describing SAP HANA Vora 135

UNIT OBJECTIVES

Describe SAP HANA data provisioning

Describe SAP HANA data provisioning tools

Describe how SAP HANA Vora enables BI over Big Data

Lesson 1

In document HA100SPS12 (Page 105-113)