4211 sap hana data modeling fundamentals and new functionality
Post on 12-Nov-2014
128 Views
Preview:
DESCRIPTION
TRANSCRIPT
© 2011 SAP AG. All rights reserved. 1
SAP HANA 1.0Modeling fundamentals and new functionality
Customer Solution Adoption (CSA)
© 2011 SAP AG. All rights reserved. 2
Customer Solution Adoption Mission
Our people make innovation adoption a beautiful experience for SAP customers
Readiness for take-off with our customers
Our Critical Success Factors
Referenceability by taking end-to-end accountability for early adopters
Repeatability for rapid and reliable deployments by SAP & our ecosystem
© 2011 SAP AG. All rights reserved. 3
Disclaimer
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.
© 2011 SAP AG. All rights reserved. 4
Agenda
� Modeling Fundamentals & Best Practices
� Analytical View & Calculation View Fundamentals
� Design time vs. Runtime objects
� General Modeling Principles
� Modeling new functionality
© 2011 SAP AG. All rights reserved. 5
� 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
Lan
gau
ge
� 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 FundementalsM
od
eli
ng
Views
© 2011 SAP AG. All rights reserved. 6
SAP HANA Modeling Best Practices
Analytical View Attribute View Column Table
Calculation View
© 2011 SAP AG. All rights reserved. 7
Agenda
� Modeling Fundamentals & Best Practices
� Analytical View & Calculation View Fundamentals
� Design time vs. Runtime objects
� General Modeling Principles
� Modeling new functionality
© 2011 SAP AG. All rights reserved. 8
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 specific
set 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
Analytical View
Attribute View Dimension
Left Outer
Fact Table
N N
1
11
© 2011 SAP AG. All rights reserved. 9
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
© 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
© 2011 SAP AG. All rights reserved. 11
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-used
tables joins are omitted; filters are
pushed down
� Attributes are retrieved and Measures
are calculated in parallel
Design time Model
SELECT PERIO, VKORG, SUM(CM1)
© 2011 SAP AG. All rights reserved. 12
Agenda
� Modeling Fundamentals & Best Practices
� Analytical View & Calculation View Fundamentals
� Design time vs. Runtime objects
� General Modeling Principles
� Modeling new functionality
© 2011 SAP AG. All rights reserved. 13
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 using GROUP BY, reducing Coulmns)
Avoid transfer data of large resultsets between the HANA DB and client application
- Do calculation after aggregation.
- Avoid Complex expressions (IF, CASE, ... )
Join on Key Columns or Indexed Columns
Avoid calculations before aggregation on line item level
Reduce data transfer between views
© 2011 SAP AG. All rights reserved. 14
SPART MATNR WERKS KWMENG
ABC DPC1017 100 60
FILTERS pushed down
SELECT SPART, MATNR, WERKS, SUM(KWMENG) FROM VIEW WHERE
WERKS = ? AND MATNR = ?
SELECT SPART
SUM(KWMENGA)SUM(KWMENGB) SUM(KWMENGC) SUM(TOTAL) FROM CALCVIEWWHERE MATNR = DPC1017GROUP 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)
© 2011 SAP AG. All rights reserved. 15
Agenda
� Modeling Fundamentals & Best Practices
� Analytical View & Calculation View Fundamentals
� Design time vs. Runtime objects
� General Modeling Principles
� Modeling new functionality
© 2011 SAP AG. All rights reserved. 16
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
© 2011 SAP AG. All rights reserved. 17
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
© 2011 SAP AG. All rights reserved. 18
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
© 2011 SAP AG. All rights reserved. 19
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
© 2011 SAP AG. All rights reserved. 20
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
© 2011 SAP AG. All rights reserved. 21
SAP HANA - Analytical Privileges
� 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)
© 2011 SAP AG. All rights reserved. 22
SAP HANA - Intellisense
� Intellisence assistance provided in SQL editor and function editors
� Provides both the function Syntax details and code Examples
© 2011 SAP AG. All rights reserved. 23
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
© 2011 SAP AG. All rights reserved. 24
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 Union
instead of defining the flag within a
Projection node
Constant Union
Manage Mapping
© 2011 SAP AG. All rights reserved. 25
SAP HANA – Attribute views
Table Aliases
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.
© 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
© 2011 SAP AG. All rights reserved. 27
Thank You!
SAP Labs, LLC
SAP Customer Solution Adoption
© 2011 SAP AG. All rights reserved. 28
No part of this publication may be reproduced or transmitted in any form or for any
purpose 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 contain
proprietary software components of other software vendors.
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of
Microsoft 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/390 Parallel 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 or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries.
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
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 as
well 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 Business Objects 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 logos are 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 informational purposes only. National product specifications may vary.
The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, or transmitted in any form or for any purpose without the express prior written permission of SAP AG.
top related