Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 12

Customer

HANA Modeling
Best Practices

Mayo, 2018

d e only with an image


Us e this ti tle s li
Virtual Data Modeling
SAP Business One - Semantic Layer

HANA Views

Semantic Layer End user

HANA View
Designer

Table 1 Table 2 Table 3 Table 4 Table 5 Table 6


Field Field Field Field Field Field
Field Field Field Field Field Field
Field Field Field Field Field Field
Field Field Field Field Field Field
Field Field Field Field Field Field

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Customer 3


SAP HANA View Modeling – Overview
Flavors of SAP HANA View Modeling Approaches

Attribute Views Analytic Views Calculation View


• Compose a dimensional view • Combines Fact-Tables with • Great flexibility for advanced use
with a series of attributes derived Attribute-Views to Star-Schema- • Approach to model custom
from a collection of tables or OLAP Cube-like objects for scenarios like
e.g. Master Data Views multidimensional reporting. - Combined use of Multiple-Fact
 Highly re-used and shared in • Hierarchies are key for multi- Tables/Analytics Views
Analytic- and Calculation Views dimensional access (navigation, - Build Models on Normalized Data
 Used to build Hierarchies filtering, slicing and aggregation) - Re-Use and stack views
 Hierarchies are key elements in - Make use of custom scripted views
use with Analytic View for multi-
dimensional reporting

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Customer 4


3 types SAP HANA Modeling Views and its Engines

But…
• Data is moved among engines if B1 semantic layer
a model mix different types of sits on top of
Calculation
views. E.g. Sales CalcView Calculation View
Views
using AnallyticView of AR Invoice (Graphic preferred)
and Credit.
• One Analytic View only allows
measures from one table.

Calculation Engine

Analytic OLAP Join Attribute


Views Engine Engine Views

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Customer 5


What is the direction of Modeling?

Rules:
• Try to Use Calculation View for all Models, precisely graphical calculation
view shall be considered as the first option it can implement both
dimension and cube and more operation such as projection, union , join
etc.
• Avoid to use Attribute View and Analytic View, especially not to mix them
with Calculation View

Benefits:
• No data moved among different engines(Join engine, OLAP engine and
Calc Engine). All Data calculated in Calculation Engine
• No intermediate ETL table. No staging needed.

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Customer 6


Concepts

• Calculation view is column view of type calculation.

• Calculation view is required to address complex business scenario. It can be


created using attribute view, analytic view, other calculation view and column
tables.

• Calculation view can be created using Graphical editor or SQL Editor.

• Graphical calc view, view can be created as Cube or Dimension. And Cube can
be created in Star join mode.

• In Graphical calc view, only calculation engine operator is used to connect


views, tables and calc view node to create consumable output.

• SQL Editor is used to model complex calculation view using SQLScript.

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Customer 7


New Approaches
SAP HANA View Modeling – Overview
Flavors of SAP HANA View Modeling Approaches

s of s of
w i ew
n Vie n V
t io t io
u la pe la pe n ”
a l c ty io n” a lcu ty arJo
i
 C e ns  C St
/
“ D im
Attribute Views
BE
Analytic Views
U
Calculation View
• Compose a dimensional view “C Fact-Tables with
• Combines • Great flexibility for advanced use
with a series of attributes derived Attribute-Views to Star-Schema- • Approach to model custom
from a collection of tables or OLAP Cube-like objects for scenarios like
e.g. Master Data Views multidimensional reporting. - Combined use of Multiple-Fact
 Highly re-used and shared in • Stores no aggregates and mass- Tables/Analytics Views
Analytic- and Calculation Views aggregates on the fly - Build Models on Normalized Data
 Used to build Hierarchies • Hierarchies are key for multi- - Re-Use and stack views
 Hierarchies are key elements in dimensional access (navigation, - Make use of custom scripted views
use with Analytic View for multi- filtering, slicing and aggregation)
dimensional reporting

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Customer 9


SAP HANA View Modeling – New Approaches
Modeling multidimensional Scenarios in Calculation
Views

Calculation Views
Multidimensional scenarios in Calculation Views Attribute View

 Calculation Views of type Dimension


– Composing Dimension-Attributes and -Hierarchies
 Calculation Views of type CUBE with StarJoin
– Star-joins fact data with dimension-type calculation views
like Analytic Views (with same performance guidance's)
– Implicit Calculation View optimization will evaluate Analytic View
to delegate processing to same execution behavior as Analytic Views
 Note: Table functions can be used as input sources for either Dimensions or
Facts

Usage Scenario
 Implement new multidimensional scenarios / new projects
 Seek to refactor Attribute-/Analytic View scenarios

Note: As of SAP HANA SPS10 Calculation Views are not yet functional feature equivalent to Attribute- and Analytic Views (i.e. Temporal Join & Fuzzy search).

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Customer 10


SAP HANA View Modeling – Best Practices
General Performance Guidelines

Avoid transfer large result sets to client


Client A G Y Z

Avoid Complex expressions

A G Y
Reduce Columns (use group by)
Calculation Views
Procedures
A B C D G Y
Join on Key or Indexed
Functions Columns

Avoid calculations before


aggregation on line item level
A B C

A B C

A B C

Column Store
Filter data as early as possible

© 2016 SAP SE or an SAP affiliate company. All rights reserved. Customer 11


Obrigado! Thiago Mendes

Thank you! Local Product Expert


SAP Business One
thiago.mendes@sap.com

¡Gracias! @ThiagomSAP

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

You might also like