0200 - modeling - overview

27
8/12/2019 0200 - Modeling - Overview http://slidepdf.com/reader/full/0200-modeling-overview 1/27 © 2011 SAP AG. All rights reserved. 1 SAP HANA 1.0 Modeling fundamentals

Upload: bala-subrahmanyam

Post on 03-Jun-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 1/27

© 2011 SAP AG. All rights reserved. 1

SAP HANA 1.0Modeling fundamentals

Page 2: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 2/27

© 2011 SAP AG. All rights reserved. 2

 Agenda

Modeling Fundamentals & Best Practices

 Analytical View & Calculation View Fundamentals

Design time vs. Runtime objects

General Modeling Principles

Modeling new functionality

Page 3: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 3/27

© 2011 SAP AG. All rights reserved. 3

 Attribute Views (Dimensions, Time, Hierarchy, Derived)

 Analytical Views (Facts/Star Schemas)

Calculation Views (Composite views, Modeled or Script)

Transportable design time artifacts stored in the repository

Database objects (Column store views) are generated from these

development artifacts

     L    a    n    g

    a    u    g    e

Main procedural language of the SAP HANA database

Push data intensive operations into the database

Utilized in Calculation Views and Procedures

Read-Only procedures (Calculation views, highly optimized,

potential of parallelism)

Read-Write procedures (cursors, loops, conditions, transactions)

SQL

Script

SAP HANA Modeling Fundementals

     M    o     d    e     l     i    n    g

Views

Page 4: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 4/27

© 2011 SAP AG. All rights reserved. 4

SAP HANA Modeling Best Practices

 Analytical View  Attribute View Column Table

Calculation View

Page 5: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 5/27

© 2011 SAP AG. All rights reserved. 5

 Agenda

Modeling Fundamentals & Best Practices

 Analytical View & Calculation View Fundamentals

Design time vs. Runtime objects

General Modeling Principles

Modeling new functionality

Page 6: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 6/27

© 2011 SAP AG. All rights reserved. 6

SAP HANA Analytical View

Star schema consist of one fact table

containing the key figures

Dimensions describe the key figures

and enrich the data

Slicing and dicing is a feature whereby

users can take out (slicing) a specificset of data and view (dicing) the slices

from different viewpoints

Cardinality in star schemas is generally

N:1 fact to dimension

Joins in star schemas are generally Left

Outer Joins

 Analytical models are highly optimized

for aggregating mass data

 Analyt ical View

 Attr ibute View

Dimension

Left Outer 

Fact Table

N N

1

11

Page 7: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 7/27

© 2011 SAP AG. All rights reserved. 7

SAP HANA Calculation View

Several options available

Modeling using the Graphical Modeler 

Write SQL Script and use CE Functions

Write SQL Script and using SQL

Suggested option = Graphical Modeler 

No SQL or SQL Script knowledge required

Built-in Union Constant support

Graphical & SQL Script + CE Functions

Result in similar performance gains (e.g.

Field pruning, Parallelization, join

ommision)

Standard SQL

Does not provide field pruning and can be

less optimized. Useful for POCs and rapid

prototyping

Graphical

CE Functions

SQL

Page 8: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 8/27

© 2011 SAP AG. All rights reserved. 8

 Agenda

Modeling Fundamentals & Best Practices

 Analytical View & Calculation View Fundamentals

Design time vs. Runtime objects

General Modeling Principles

Modeling new functionality

Page 9: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 9/27

© 2011 SAP AG. All rights reserved. 9

SAP HANA Design Time vs. Runtime Time Objects

© SAP AG 2011

Column View

 Activate

 Activation of models creates an

executable, optimized Column

(database) view of the model

Front end’s queries column views and

as a result a specific execution plan is

instantiated based on fields requested

Un-used fields are pruned; un-usedtables joins are omitted; filters are

pushed down

 Attributes are retrieved and Measures

are calculated in parallel

Design time Model

SELECT PERIO, VKORG, SUM(CM1)

Page 10: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 10/27

© 2011 SAP AG. All rights reserved. 10

 Agenda

Modeling Fundamentals & Best Practices

 Analytical View & Calculation View Fundamentals

Design time vs. Runtime objects

General Modeling Principles

Modeling new functionality

Page 11: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 11/27

© 2011 SAP AG. All rights reserved. 11

SAP HANA General Modeling Principles

Column

Store

 Analytical

Views

 Attribute

Views

Calculation Views

Client / Application

 A B C D

 A B C D G Y

 A G Y

 A G Y Z

Filter data amount as early as possible in the lower layers(CONSTRAINTS, WHERE Clause,Analytical Privileges..)

Aggregate data records (e.g usingGROUP BY, reducing Coulmns) 

Avoid transfer data of large resultsets between the HANADB and client application 

- Do calculation after aggregation.

- Avoid Complex expressions (IF, CASE, ... )

Join on Key Columns or IndexedColumns 

Avoid calculations beforeaggregation on line item level 

Reduce data transfer between views 

Page 12: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 12/27

© 2011 SAP AG. All rights reserved. 12

SPART MATNR WERKS KWMENG

 ABC DPC1017 100 60

FILTERS pushed

down

SELECT SPART, MATNR, WERKS,

SUM(KWMENG) FROM VIEW WHEREWERKS = ? AND MATNR = ?

SELECT

SPART

SUM(KWMENGA)

SUM(KWMENGB)

SUM(KWMENGC)

SUM(TOTAL)

FROM CALCVIEWWHERE MATNR =

DPC1017

GROUP BY SPART

OLAP AOLAP AOLAP A

SPART PLANT A PLANT B PLANT C TOTAL

 ABC 60 60 0 120

SPART MATNR KWMENGA KWMENGB KWMENGC

 ABC DPC1017 60 0 0

 ABC DOC1017 0 60 0

SPART MATNR WERKS KWMENG

 ABC DPC1017 1000 60

SPART MATNR WERKS KWMENG

- - - -

SAP HANA Basic Modeling Principle (Aggregate, filter, pushdown)

Page 13: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 13/27

© 2011 SAP AG. All rights reserved. 13

 Agenda

Modeling Fundamentals & Best Practices

 Analytical View & Calculation View Fundamentals

Design time vs. Runtime objects

General Modeling Principles

Modeling new functionality

Page 14: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 14/27

© 2011 SAP AG. All rights reserved. 14

SAP HANA – Variables & input parameters

Variables and Parameters are usually entered

manually by the user using UI Prompts

Variables are bound to attributes and used to filter

using WHERE clauses (Single, Interval, Range)

Input Parameters are passed by Placeholders and

used in Formulas (Attribute, Currency, Date,

Static List) It is the task of the client to convert the user input

into either WHERE clause or Placeholders when

accessing the data

Devine Variable

Use Variable as a Prompt

Page 15: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 15/27

© 2011 SAP AG. All rights reserved. 15

SAP HANA - Aggregation Node

 A new Aggregated Columns folder is visible in the output of a Graphical Calculation View

The definition of the specific aggregation type is maintained in the property view

Only columns of numerical & date data types are allowed (like for measures)

The calculation and filtering occurs after the aggregation

 Aggregation

Page 16: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 16/27

© 2011 SAP AG. All rights reserved. 16

SAP HANA - Exceptional Aggregation

 A new Counters folder is visible in the output view of a Graphical Calculation view

 Ability to define Count Distinct functions based on specific Dimensions (1..N)

Count

Page 17: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 17/27

© 2011 SAP AG. All rights reserved. 17

SAP HANA - Optional Measures

Within Calculation views measures can now be made optional

The output node instead will be a projection node

Models should be simple SQL views that do not automatically aggregate the measures

Multidimensional

Reporting Flag

The output node does not offer any measures

(or hierarches) but just attributes

The Calculation view is not consumable via

MDX (Explorer / AAO)

The Calculation view is only consumable via

SQL

To disable measures set the Multidimensional

Reporting flag accordingly within the

properties view

Page 18: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 18/27

© 2011 SAP AG. All rights reserved. 18

SAP HANA - Join Suggestions

The goal is to simplify modeling by proposing tables and suggesting joins

This features is available in both Attribute and Analytical Views

Prerequisite: table DD08L needs to exist in HANA

Select Propose Tables, then choose the required tables

Highlight all the tables and select Suggest Joins

Propose Tables

Suggest Joins

Page 19: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 19/27

© 2011 SAP AG. All rights reserved. 19

SAP HANA - Analytical Privi leges

In addition to equal and between SP4 provides GE (greater equal), LE (less equal) and

CP (contains pattern), GT (Greater Than) and LT (Less Than)

Page 20: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 20/27

© 2011 SAP AG. All rights reserved. 20

SAP HANA - Intellisense

Intellisence assistance provided in SQL editor and function editors

Provides both the function Syntax details and code Examples

Page 21: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 21/27

© 2011 SAP AG. All rights reserved. 21

SAP HANA - Multi User Support

The same object will not exist in the inactive workspace of several users

Only one inactive version of any object is allowed

In addition there is now functionality to discard an inactive version and to return it to the

active status

System Privileges - REPO.WORK_IN_FOREIGN_WORKSPACE required

Page 22: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 22/27

© 2011 SAP AG. All rights reserved. 22

SAP HANA - Union

Constant Union enhancement

 Allow to add unmapped columns that

only have a constant mapping

 Additionally it is required to specify a

data type

Example. The Planned vs. Actual

indicator can now be set in the Unioninstead of defining the flag within a

Projection node

Constant Union

Manage Mapping

Page 23: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 23/27

© 2011 SAP AG. All rights reserved. 23

SAP HANA – Intermediate Data Preview

Calculation View enhancement

 Allows easier design and prototyping

Requires that the View has been

activated

Example: Data Preview before and

after filtering a Join

Page 24: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 24/27

© 2011 SAP AG. All rights reserved. 24

SAP HANA – Decision Tables

SQLScript Enhancement

Graphical user interface to simplify

changing data

Supports Tables and Analytical Views

Example: Updating prices based on

attribute and measure conditions

Page 25: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 25/27

© 2011 SAP AG. All rights reserved. 25

SAP HANA – Attribute views

Table Al iases

 Add the same table to an Attribute View multiple times with the assignment of an alias.

Upon selecting a table twice the system will prompt for an alias.

Hide attributes

Functionality to hide attributes has

been extended to attribute views

from within the context of an

analytic view.

Page 26: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 26/27

© 2011 SAP AG. All rights reserved. 26

SAP HANA - Auto Documentation

Generate the metadata documentation for information models and packages created on

SAP HANA systems

Page 27: 0200 - Modeling - Overview

8/12/2019 0200 - Modeling - Overview

http://slidepdf.com/reader/full/0200-modeling-overview 27/27

© 2011 SAP AG. All rights reserved. 27

No part of this publication may be reproduced or transmitted in any form or for anypurpose without the express permission of SAP AG. The information contained

herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors containproprietary software components of other software vendors.

Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks ofMicrosoft Corporation.

IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5,System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries,

zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6,

POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes,BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF,

Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere,Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM

Corporation.

Linux is the registered trademark of Linus Torvalds in the U.S. and other

countries.

 Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks orregistered trademarks of Adobe Systems Incorporated in the United States and/or

other countries.

Oracle and Java are registered trademarks of Oracle and/or its affi liates.

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and

MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®,

World Wide Web Consortium, Massachusetts Institute of Technology.

© 2011 SAP AG. All rights reserved.

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects

Explorer, StreamWork, and other SAP products and services mentioned herein aswell as their respective logos are trademarks or registered trademarks of SAP AG

in Germany and other countries.

Business Objects and the Business Objects logo, BusinessObjects, Crystal

Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other BusinessObjects products and services mentioned herein as well as their respective logos

are trademarks or registered trademarks of Business Objects Software Ltd.Business Objects is an

SAP company.Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other

Sybase products and services mentioned herein as well as their respective logosare trademarks or registered trademarks of Sybase, Inc. Sybase is an SAP

company.

 All other product and service names mentioned are the trademarks of their

respective companies. Data contained in this document serves informationalpurposes only. National product specifications may vary.

The information in this document is proprietary to SAP. No part of this documentmay be reproduced, copied, or transmitted in any form or for any purpose without

the express prior written permission of SAP AG.