Professional Documents
Culture Documents
Public
Speakers
This presentation outlines our general product direction and should not be relied on in making a
purchase decision. This presentation is not subject to your license agreement or any other agreement
with SAP. SAP has no obligation to pursue any course of business outlined in this presentation or to
develop or release any functionality mentioned in this presentation. This presentation and SAP's
strategy and possible future developments are subject to change and may be changed by SAP at any
time for any reason without notice. This document is provided without a warranty of any kind, either
express or implied, including but not limited to, the implied warranties of merchantability, fitness for a
particular purpose, or non-infringement. SAP assumes no responsibility for errors or omissions in this
document, except if such damages were caused by SAP intentionally or grossly negligent.
Public
SAP HANA View Modeling – Overview
Virtual Data Modeling as a key SAP HANA concept
HANA Views
• No persistent Aggregations | single atomic copy of data
Physical Tables • In-Memory Engines | Performance
Database Layer • Multidimensional Reporting Models
• Enterprise Applications Virtual Data Models
Calculation Views
Column table
Complex Calculation
Views demand a
more explicit intent
and control of the
modeled set-based
data flow, i.e. slicing,
aggregation and
filtering of sets as
input to joins, unions
etc.
Public
SAP HANA View Modeling – New Approaches
New Approaches Overview
Key new approaches
Specific Enhancements
Calculation View Modeling
• Column lineage analysis
– Calculation views-Star-join instead of Analytical/Attribute
• Comment & View Deprecation
SQL-Script Integration • Copy & Replace nodes!
– Table functions as data sources • Multilanguage-label support in Views
(instead of script-based Calculation Views) • Performance Analysis / Debugger enhancements
• Support Labels/Descriptions in value help dialogs
Analytic Privileges
– Support for SQL based analytic privileges
Hierarchies
– SQL enablement & Time Dependent hierarchies General Enhancements
• Implicit SQL Execution - Model unfolding
Data Sources
– CDS entities, tenant container database tables
Web-based Editor
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).
Recommended approach
*Supported external systems and restrictions are documented in SAP Note 1868209
*Note: Use of hierarchy expression will be fully enabled, once hierarchy-expressions are
documented in the SAP HANA SQL documentation and thus generally supported.
– ..
Filtering on a hierarchy node value
– The node column can be used for filtering
SalesHierarchyNode = MAJESTIX
Public
SAP HANA View Modeling – Best Practices
General Performance Guidelines
Avoid transfer data of large result sets between the HANA DB and client
application
Client A G Y Z
Do calculation after aggregation
Avoid Complex expressions, instead push down into model
Additional SQL Optimization Since SAP HANA Rev 62 the SQL optimization
SQL Optimization can explicitly be determined setting
Calculation Engine Optimization
includes the “Execute In:” property to “SQL Engine”
• Stacked Views /
Calculation Views SQL unfolding Since SAP HANA SPS9 the optimized execution
• Cost-based behavior implicitly evaluates to leverage
Optimization additional SQL optimization
• Delegate
processing to SAP HANA SPS10 optimization enhancements
best operator include implicit optimized Star Join processing
Operator list
Calculation View
Debugger
Explain Plan
select
division, sum(prevamount), sum(currentamount)
from CvOrdersQuery calculated column
('placeholder' = ('$$year$$', '2013')) quarter
where
country in ('USA', 'GERMANY') and database = 'IQ'
group by division input parameter
year
constraint
category
analytical privilege
unit
group by
where clause
division, quarter
country
select
teamname, playername, rank,
sum(playergoals), sum(teamgoals) select teamid, teamname
from from CvTeamLookup
CvSoccerPlayers(
'placeholder'=('$$top_n_players$$','2'),
'placeholder'=('$$ip_team$$','paderbom')
) Select playerid, playername from
group by teamname, playername, rank CvTeamLookup where teamname = ?
order by teamname
select select
country, sum(prevous), sum(current) country, sum(prevous), sum(current)
from CvSalesQuery from CvSalesQuery (
where year = 2015 and 'placeholder' = ('$$ip_year$$', '2015')
country in ('usa', 'germany') and )
SOURCE = 'Hot' where country in ('usa', 'germany')
group by country order by country group by country order by country
Sales
$160
Solution!
Generally the requested columns mandates the level of aggregation. Within Calculation Model Set
Under certain circumstances this level of aggregation is to course and Keep Flag = True on Order ID
instead requires a finer level of aggregation.
• Setting the Keep flag will force additional columns into context
altering the level of granularity.
Dynamic Join
Identify
reproducible
pattern
Split big
models into
smaller parts
Do not build
monolithic
views
Access replays of keynotes, Demo Jam, SAP TechEd live interviews, select lecture sessions, and more!
Hands-on replays
http://sapteched.com/online
©©2015
2015
SAP
SAP
SESE
oror
anan
SAP
SAP
affiliate
affiliate
company.
company.
AllAll
rights
rights
reserved.
reserved. Public 3535
Thank you!
Contact information:
Christoph Morgen
SAP HANA Product Management Werner Steyn
SAP SE | Dietmar-Hopp-Allee 16 | 69190 Walldorf | Germany SAP HANA Competence Center, SAP SE
christoph.morgen@sap.com | www.sap.com werner.steyn@sap.com | www.sap.com
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate
company) in Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices.
Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP SE or its
affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE or SAP affiliate company products and
services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as
constituting an additional warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop
or release any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future
developments, products, and/or platform directions and functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time
for any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-
looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place
undue reliance on these forward-looking statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions.