Overview of Calculation View Modeling In: Sap Hana Using Sap Web Ide

Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

Overview of Calculation View Modeling in

SAP HANA Using SAP Web IDE


DAT372
PUBLIC
Speakers

Las Vegas
September 24–27, 2019

Yves Augustin
Sebastian Grass

Barcelona
October 8-10, 2019

Jan Zwickel
Yves Augustin

Bangalore
November 13-15, 2019

Raghavendra Naykar
Narasimha Rao Bolagoni

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2


Take the session survey.
We want to hear from you!

Complete the session evaluation for this session


DAT372 on the SAP TechEd mobile app.

Download the app from


iPhone App Store or Google Play.

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


Disclaimer

The information in this presentation is confidential and proprietary to SAP and may not be disclosed without the permission of SAP.
Except for your obligation to protect confidential information, this presentation is not subject to your license agreement or any other service
or subscription agreement with SAP. SAP has no obligation to pursue any course of business outlined in this presentation or any related
document, or to develop or release any functionality mentioned therein.
This presentation, or any related document and SAP's strategy and possible future developments, products and or platforms directions and
functionality are all subject to change and may be changed by SAP at any time for any reason without notice. The information in this
presentation is not a commitment, promise or legal obligation to deliver any material, code or functionality. This presentation 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. This presentation is for informational purposes and may not be incorporated into a contract. SAP
assumes no responsibility for errors or omissions in this presentation, except if such damages were caused by SAP’s intentional or gross
negligence.
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.

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


Agenda

Why Graphical View Modeling

Features of graphical modeling

Features only available in SAP Web IDE for


SAP HANA

Using the Graphical User Interface

Good to Know

Accessing objects outside of Project

Overview Exercises

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


Why Graphical View Modeling
Graphical modeling

Use graphical modeling to


 structure large development projects
 foster communication about development objects
 achieve good performance
 follow SAP HANA strategy and benefit from future
improvements

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


Features of graphical modeling
Integration with other Components

Close integration with

 SQLScript via table function nodes

 Graph scenarios

 Spatial scenarios

 Data Warehousing Foundation

 SQL hierarchies

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9


Integration with Optimization Settings

Calculation Views offer close coupling to internal optimizations

 push-down of filters

 join-pruning

 union-pruning

 column pruning

 control of parallelization

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10


Analysis of Models

Improve performance using

Performance Analysis Mode Debug View Mode

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 11


Insight into Data and Models

Get detailed insight into your models by

 model outline

 auto documentation

 lineage analysis

 various data preview options

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 12


OLAP Features

Make use of various OLAP features

 Restricted columns

 Calculated columns

 Currency conversion

 Temporal joins

 Ranking

 Star joins

 Anonymization

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 13


OLAP Features

Make use of various OLAP features

 Input parameters  Client handling

 Analytic Privileges
 Hierarchies

 Masking
 History tables

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 14


Features only Available in
SAP Web IDE for SAP HANA
New Features in Web IDE (Selection)

 Table function nodes that can be integrated into data flow


 Masking of sensitive columns
 Set operations
 Reuse of defined currency conversion settings (reference / copy)
 Different accuracy settings for currency conversion
 More flexible filters and setting of keep flag
 Improved data insight tools

 For more details see: Live Expert Series: What’s New in SAP HANA 2.0 SPS 02

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 16


New Features in Web IDE (SPS03)

 Anonymizing data (k-anonymity,differential privacy)


 Non-equi joins
 More referential join options
 SQL hierarchy functions
 Extract parameters from base view
 Additional currency conversion options
 Multi-join
 Union pruning configuration dialog
 Graph and hierarchy preview

For more details see: Live Expert Series: What’s New in SAP HANA 2.0 SPS 03

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 17


New Features in Web IDE (SPS04)

 Model-based parallelization
 Flexible ranking
 Influence processing flow by session variables
 Fuzzy search
 K-anonymity enhancements

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 18


New Features in Web IDE (SPS04)

 SQL hierarchy enhancements


 Schema based synonym creation
 Tailored mapping display
 Improved search functionality
 Convert column name to uppercase

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 19


New Features in Web IDE (SPS04)

 Swapping order in minus nodes


 Navigate to included view
 Hyperlink metadata
 Pending deployment indication

 For more details see: Live Expert Series: What’s New in SAP HANA 2.0 SPS 04

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 20


Using the Graphical User Interface
Window areas adjust size
details/
navigate/zoom scenario
development
perspective area
database
explorer
integration
preferences
with GIT
files / models model outline
modeling details
toolbar

scenario/
nodes area
display
console
problem
view

console/build information
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 22
Close windows

After working with several models many windows might be open

To clean-up your working area you can close several windows at once

Right-click on the window that you want to keep and select “Close Others”

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 23


Selection of fields

• multiple selections • deselection of single fields

Each mouse click to unselected field selects this Each mouse click to already selected field unselects this single
field in addition field

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 24


Selection of fields

• selection of all fields • deselection of multiple fields

CTRL + A selects all fields CTRL + SHIFT + A unselects all fields

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 25


Mapping: Show Mapped/Unmapped

• easy way to determine which fields still need to be mapped


• default can be changed in Preferences
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 26
Moving around

click to move all nodes at once


click to zoom in / zoom out

use mouse-wheel to zoom in / zoom out

click at empty space and hold button while moving mouse


around to move all nodes at once

click at single node and hold button while moving mouse


to move node around

use “Show Overview” button to see outline of model in


which you can move a blue rectangle to move all nodes
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 27
Increase / decrease working window

to toggle window size between full screen and partial screen:

press CTRL+M
or double click on tab

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 28


Build to see impact of changes

After changing models press Save and build the file so that the changes become effective. If you save a
modification but do not build the model you will see "Pending Deployment" behind your Calculation View
file. Also the including folder(s) will be set to "Pending Deployment" and the old deployed model will be
accessed

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 29


Good to know…
Connecting Nodes

If Connector Icon does not appear, click outside node and at node again

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 31


Accessing Objects outside of Project
SAP HANA Deployment Infrastructure (HDI)

Deployment
 deployments are done into isolated HDI containers
 runtime objects of Calculation Views reside in HDI-container
(“schema”)

Access
 provide: services provide access to target objects of synonyms *_HDI_CONTAINER SCHEMA YXZ _SYS_BI
(services are referenced in mta.yaml file) „external data“

 grant: .hdbgrants defines what privileges are granted to


technical users that are used during modeling; privileges are
assigned by services that are referenced in .hdbgrants file
 refer: synonyms refer to objects outside of container cross schema data access
provided by synonym and a
XSA data access service

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 33


Data Access: SAP HANA Service Connection

right-click on db-module

• create/add a user provided service or add a HDI-service to mta.yaml


• access objects based on these services (using synonyms and .hdbgrants definitions)
• subsequently, missing synonyms can be easily created during Add Data Source

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 34


Example for Using .hdbgrants file to use objects from schema DAT372

1.) create SQL role for the object owner and grant required privileges to the role
CREATE ROLE "grantToOOUser";
GRANT SELECT on SCHEMA DAT372 to "grantToOOUser" WITH GRANT OPTION

2.) create SQL role for application user and grant required privileges to the role
CREATE ROLE "grantToAPUser";
GRANT SELECT on SCHEMA DAT372 to "grantToAPUser";

{ "UPS": {
"object_owner": {
3.) create and build .hdbgrants file using the user provided
"roles": [ "grantToOOUser" ]},
service "UPS" to grant these roles to the respective technical
users "application_user": {
"roles": [ "grantToAPUser" ]
} }}

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 35


Steps to Use External Objects (If no Project Template is Provided)

only, if no service [2. build .hdbgrants file]


exists which provides { "UPS": {
1. Add
access to relevant
"object_owner": {

service "roles": [ "grantToOOUser" ]},

objects "application_user": {
"roles": [ "grantToAPUser" ]
} }}

synonym exists
3a refer to
object
no synonym

List roles that should be added in


3b create .hdbgrants file
synonym

tick only if HDI Container was tick only if roles already exist that grant authorizations for
selected as Service Connection in object, otherwise adapt .hdbgrants file manually before (see
step 1 two slides earlier).
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 36
Improvements for Step 3 of Previous Slide (Add Data Source/mass synonym)

a) creation of clicking at column name


synonym allows filtering and
selecting columns
during step thus providing more
"Add Data flexibility in selecting
Source" objects

filter schema
b) mass
creation prior
to modeling
filter target object type

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 37


Tip when using Find Data Sources

By clicking at the column header you can enter


additional filters

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 38


Build Performance
Compare SAP Note 2821857

 Activation  Recommendation
− Activation time lengthened by number of − Use default / empty / SQL ACCESS ONLY
objects that depend on activated view type of views if hierarchy views are not
− If hierarchy-views are generated more needed for reporting
dependent objects are generated:
Hierarchy views generated for plain Calculation View type…

…Cube …SQL ACCESS ONLY

− Additional performance benefits can be


expected when using the new development
environment SAP Web IDE for SAP HANA
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 39
Build Performance
(a) (b)

 When are hierarchy views needed? reporting tools that use reporting tools that not
hierarchy views of use hierarchy views
As a rule of thumb: modeled hierarchies
− usage of hierarchies: if you do not model
hierarchies probably these hierarchy views are
not needed Reporting
− reporting tool: most SAP reporting tools use views
views of modeled hierarchies (a) but it is
Intermediate
unlikely that 3rd party tools need these
views
hierarchy views (b)
− function of view: hierarchy views only
(c)
needed for views that are directly facing
reporting tools (a) or used as Dimension views Star-Join
with hierarchies in star-join views (c).

Dimension
view
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 40
Overview Exercises
Exercises
• Chapter 1 Create a Project with a simple Calculation View (~10 minutes)

• Chapter 2 Consume a Calculation View located in another project (~20 minutes)

• Chapter 3 Create Synonyms for all objects of a schema (~5 minutes)

• Chapter 4 Use new Rank node (introduced with SPS04) (~20 minutes)

• Chapter 5 Get most out of the Mapping Dialog (~5 minutes)

• Chapter 6 Use Data Categories to reduce build time (~5 minutes)

• Chapter 7 Decrease query runtime by Union Pruning (~10 minutes)

• Chapter 8 Ensure Data Privacy via k-anonymity (~10 minutes)

• Chapter 9 Use column masking (~5 minutes)

• Chapter 10 Use fuzzy search on addresses (~5 minutes)

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 42


How to navigate through the instruction in the Web-Version

Select Chapter by clicking at it Select Exercise by clicking at it

After last instruction step of an Exercise move to the


next Exercise by using button "Next Exercise" or
navigate back to the Chapter/Exercise overview by
clicking at icon SAP TECHED

Navigate to next instruction step by clicking at arrow

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 43


Continue your SAP TechEd 2019 Learning Experience
Join the digital SAP TechEd Learning Room 2019 in SAP Learning Hub

 Access SAP TechEd Learning Journeys


 Discover related learning content
 Watch webinars of SAP TechEd lectures
 Learn about SAP’s latest innovations with openSAP
 Collaborate with SAP experts
 Self-test your knowledge
 Earn a SAP TechEd knowledge badge

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 44


Engage with the SAP TechEd Community
Access replays and continue your SAP TechEd discussion after the event
within the SAP Community

Access replays Continue the conversation Check out the latest blogs
 Keynotes  Read and reply to blog posts  See all SAP TechEd blog posts
 Live interviews  Ask questions  Learn from peers and experts
 Select lecture sessions  Join discussions
http://sapteched.com/online sap.com/community SAP TechEd blog posts

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 45


More information

Related SAP TechEd sessions


 DAT105 – SAP HANA Cloud: The Single Gateway to All Data
 DAT201 – SAP Cloud Platform Integration for Data Services: Integration Use Cases
 DAT209 – Top Use Cases for SAP HANA Cloud Services
 DAT813 Road Map for SAP HANA and SAP HANA Cloud
 AIN106 – Demystifying SAP HANA Cloud Services

Public SAP Web sites


 SAP Community: www.sap.com/community
 SAP products: www.sap.com/products

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 46


Thanks for attending this session.

Feedback Contact for further topic inquiries


Please complete your session evaluation Dr. Jan Zwickel
for DAT372 SAP HANA Product Management
[email protected]
Follow us

www.sap.com/contactsap

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


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.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its
distributors contain proprietary software components of other software vendors. National product specifications may vary.
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 or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP 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 platforms, 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, and they
should not be relied upon in making purchasing decisions.
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. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/copyright for additional trademark information and notices.

You might also like