Date post: | 07-Nov-2014 |
Category: |
Documents |
Upload: | talk2parimi |
View: | 192 times |
Download: | 8 times |
Mastering InfoCube Design
Luis Orama
Platinum Consultant
SAP
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 2
Agenda
InfoCube Design: Key Concepts
InfoCube Design: Issues & Techniques
Tips and Tricks
9 Decision Points for Dimensional Data Warehouse Design
èèèè
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 3
Agenda
InfoCube Design: Key Concepts
InfoCube Design: Issues & Techniques
Tips and Tricks
9 Decision Points for Dimensional Data Warehouse Designè
èèè
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 4
InfoCube Design: Key Concepts
n The design of your data model is critical because it impacts
n Data load performancen Reporting performancen Hardware/database sizing
n The overall goals of the InfoCube design
n Offer information to end-users in a way that matches their normal understanding of the business
n Deliver structured information, enabling easy navigation/drill-downn Produce a model that can be easily implemented
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 5
InfoCube Design: Key Concepts (cont’d)
n BW data flow
n How data flows into BW & how users report on this data
n Multi-dimensional models & Star Schemas
n InfoCubes
n Fact, Dimension, and SID tables
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 6
Source systems BW
Reporting application
Key Concept #1 - BW Data Flow
BW Information Integration Architecture
SAPR/3APOCRMBBP
Legacy
ExternalProvider
Extraction
Master Data
ETL Tools
PSAPSA InfoCubesInfoCubes
Business Rules
Cleansing & Transformation
Business Rules
Granularity
Integration
BW• Business Explorer• Web• Graphical User Interf.
SAP Models• Advanced Planning• Enterprise Mgmt• CRM
Third-Party Tools(ODBC/ ODBO)
Metadata
BW Operational Data Store
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 7
1 - BW Data Flow (cont’d)
BW Information Access Architecture
Legacy
ExternalProvider
Master DataMaster Data
ETL Tools
PSA
BW Operational Data Store
InfoCubes
BW• Business Explorer• Web• Graphical User Interf.
SAP Models• Advanced Planning• Enterprise Mgmt• CRM
Third-Party Tools(ODBC/ ODBO)
SAPR/3APOCRMBBP
Source systems BW
Reporting application
Metadata
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 8
Key Concept #2 - MDMs and Star Schemas
n Multi-dimensional Data Models (MDM)
n Are used by most data warehousesn Store data in dimensionsn Meet reporting needs with minimum storage
u Minimize report runtimes
n Allow users to drill-down and slice-and-dice
n MDMs are also known as Star Schemas
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 9
Text
SID Tables
Master
Hierarchies
Hierarchies
Master
SID Tables
Text
Hierarchies
Master
SID Tables
Text
Hierarchies
Master
SID Tables
Text
Hierarchies
Master
SID Tables
Text
Hierarchies
Master
SID Tables
Text
Text
SID Tables
Master
Hierarchies
Text
SID Tables
Master
Hierarchies
Text
SID Tables
Master
Hierarchies
DimensionTable
Text
SID Tables
Master
Hierarchies
DimensionTable
DimensionTable
DimensionTable
DimensionTable
Hierarchies
Master
SID Tables
Text
FACT
2 - MDMs and Star Schemas (cont’d)
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 10
2 - MDMs and Star Schemas (cont’d)
n The SAP BW Schema n Uses a sophisticated approach to guarantee data
consistencyn Offers schema-based functionality for end users’ analysis
needs
n BW’s MDM consists of two partsn InfoCubesn Shared Master Data Tables
u Valid for all InfoProviders
Key
Feature
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 11
2 - MDMs and Star Schemas: Tips
n Consider using Business Content whenever possiblen BC InfoSources are a good starting point for identifying entities,
attributes and facts (key figures)
n It’s easy to identify the Business Content for your area n BW offers InfoProviders by InfoArea and InfoSources by
application
Great
Feature
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 12
Key Concept #3 - InfoCubes
n Data is stored in “InfoCubes” n InfoCubes are essentially optimized, mini-databases
BW
R/3
Tables optimized for data processing
Cubes optimized for reporting
Extraction
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 13
Key Concept #4 - Fact, Dimension, & SID Tables
n InfoCubes are represented via Fact and Dimension tablesn The Fact table contains key figures
u e.g., Net Sales was 1.23 million USD
n The Dimension tables contain characteristicsu e.g., The net sales was for material “CAL22MAST15A”
n Dimension tables use SID tables to save storage spacen SID tables contain SID IDs that represent master data
u e.g., SID #000222 may represent material “CAL22MAST15A”
n Each SID table can be used by > 1 InfoCube
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 14
4 - Fact, Dimension, & SID Tables (cont’d)
Text
SID Tables
Master
Hierarchies
Hierarchies
Master
SID Tables
Text
Hierarchies
Master
SID Tables
Text
Hierarchies
Master
SID Tables
Text
Hierarchies
Master
SID Tables
Text
Hierarchies
Master
SID Tables
Text
Text
SID Tables
Master
Hierarchies
Text
SID Tables
Master
Hierarchies
Text
SID Tables
Master
Hierarchies
DimensionTable
Text
SID Tables
Master
Hierarchies
DimensionTable
DimensionTable
DimensionTable
DimensionTable
Hierarchies
Master
SID Tables
Text
FACT
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 15
4 - Fact, Dimension, & SID Tables: Limitations
n Fact tables allown 16 Dimensionsn 3 Dimensions are SAP’s: Time, Unit and Packet IDn Can have up to 233 key figures assigned to them
n Dimension tablesn Can have up to 248 characteristics assigned to them
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 16
Agenda
InfoCube Design: Key Concepts
InfoCube Design: Issues & Techniques
Tips and Tricks
9 Decision Points for Dimensional Data Warehouse Designè
è
èè
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 17
InfoCube Design: The “Big” Picture
n InfoCube design involves balancing
n Granularity / Analysis needsn Data volumen Performance
n Keys to success
n Know your needsn Store only the data you need n Optimize the storage
n We will cover techniques for each...
AnalysisNeeds
Volumeof DataPerformance
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 18
InfoCube Design: Common Issues
n Rows are added to the fact table defined by the key attributes of the dimension table
n Changes to dimension attributes (slowly changing dimensions)
n These can have an impact on reporting views
n With large number of rows, fact tables and/or large dimension tables, precalculated aggregates must be introduced for performance reasons
Issue
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 19
InfoCube Design: Common Issues (cont’d)
n N:M relationships within a dimensionn e.g. material and material colorn There is no easy way to handle this
n No leaf attribute valuesn e.g. Material and material group in same dimensionn Facts are delivered at the material group leveln This results in null/blank values for the material
n Performance - Degenerate Dimensionsn Dimension tables should be at least 10 – 20% of the fact
tablen Larger than that and you could start having a degenerate
dimension (dimension table as large as the fact table)
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 20
InfoCube Design Issues We’ll Cover
n 1 - Building Your Data Model
n 2 - Using Line Item Dimensions
n 3 - Partitioning Fact Tables
n 4 - Using InfoCube Aggregates
n 5 - Enabling Data Compression
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 21
Technique #1 - Building Your Data Model
n 3 Key Steps
n Research and understand the underlying business processes
n Create a valid schema n Implement the schema
Building Block
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 22
1 - Building Your Data Model (cont’d)
Sales Rep ID
LastNameSalesDep
Material ID
Material NameMaterial TypeMaterial Group
Customer ID
Customer NameCityRegionOffice Name
Time Code ID
YearFiscal YearQuaterMounthDay of the Week
Material IDSales Rep IDTime Code IDCustomer ID
Sales AmountQuantityUnit Price
Time DimensionCustomer Dimension
Sales Org DimensionMaterial Dimension
FACT
Material DIM ID OrgStr DIM IDTime Code ID ....Quantity.....
SalesRep ID
Last Name...
Material DIM ID
Material IDMatType
Material ID
Mat.descriptionMatType...
OrgStr. DIM ID
SalesRep SalesDep SalesDep ID
Address...
l Focus on analytical needs -Overcome model complexity
l Build the solution as apart of an integrateddata warehouse
MDM/ Star Schema
SAP BW
ERM
l Focus on the structure of information
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 23
Technique #2 - Using Line Item Dimensions
n You can use Line Item Dimensions to improve performancen BW doesn’t generate a dimension table for these dimensionsn Less data gets extracted and stored
n Use when you expect your dimension table to be as large as the fact tablen e.g., a document dimension n Only one characteristic can be assigned to a line item dimension
since the characteristic’s SID becomes the key to the fact table
Key
Feature
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 24
2 - Using Line Item Dimensions (cont’d)
n How to do itn Use transaction RSA1 (Administrative workbench)n Navigate to the InfoProvider tabn Right-click on the InfoCube -> Select changen Navigate to the Dimension Tabn Select Line Item check box
Checklist
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 25
2 - Using Line Item Dimensions (cont’d)
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 26
Technique #3 - Partitioning Fact Tables
n Each InfoCube actually has two fact tablesn F – Fact Table – optimized for data loadingn E – Fact Table – optimized for retrieving data
n BW allows you to partition either tablen Partitioning splits the table into several tablesn This can speed up query performance significantlyn The F-fact table is already partitioned by the request’s IDn The E-Fact table can be partitioned by
u Calendar year month (0CALMONTH) u Fiscal year period (0FISCPER)u The InfoCube needs to be compressed in order to take
advantage of the partitioning. (This can be scheduled)
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 27
3 - Partitioning Fact Tables (cont’d)
TcodeRSA1
Go to Extras->Partitioning
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 28
3 - Partitioning Fact Tables: Tips
n Partitioning is fully transparent
n Partitioning has to be defined prior to activating the InfoCube
n Other Considerationsn Need to compressn Gets rid of packet IDn Can no longer manage individual data packets
Tip
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 29
Technique #4 - Using InfoCube Aggregates
n Aggregates are designed to speed up query performancen Aggregates are smaller cubesn They have the fact table definition and you can define the
dimensionsn Aggregates are transparent to the end user
n Queries will automatically select aggregates that are relevantn No manual action is needed
Aggregates increase space and “roll-up” time. You’ll need to actively maintain your aggregatesHeads Up!
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 30
Technique #5 - Enabling Data Compression
n Compressing tables improves performancen Moves the select fact records from the F- to the E-Fact Tablen You can schedule compression from the InfoCube
maintenance tab
When you do this, the request ID of each fact record is set to zero. You’ll lose capability to manage individual packet IDs
Warning
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 31
Technique #5 - Enabling Data Compression (cont’d)
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 32
Agenda
InfoCube Design: Key Concepts
InfoCube Design: Issue & Techniques
Tips and Tricks
9 Decision Points for Dimensional Data Warehouse Designè
èèè
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 33
InfoCube Design: Tips and Tricks
n 1 - Consider the Level of Granularity
n 2 - Dimension Table Design Best Practices
n 3 - Strategically Locate Dependent Attributes
n 4 - Monitor Your InfoCubes
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 34
Tip #1: Consider the Level of Granularity
n Granularity greatly influencesn Reporting Capabilitiesn Performancen Space neededn Load time
n Key Questions to askn Does the data need to be stored in the cube?
u Storing data in an ODS offers a lower level of granularity
n Does the data need to be stored in the warehouse at all?u Can you meet users drill-down requirements by linking directly
to R/3?u This would avoid having to load and store the data in BW
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 35
Tip #2: Dimension Table Design Best Practices
n Put characteristics that have a parent/child relationship into a dimensionn Good rule of thumb
n Avoid N:M relationships in a dimensionn i.e., Customer and material
n Use Navigational Attributes vs. storing the characteristic in the dimensionn Depends on the reporting view neededn Frequency of reporting
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 36
2 - Dimension Table Design Best Practices (cont’d)
n When defining the dimension of an InfoCube, you select the InfoObjects of type char and assign them to a dimension
n BW does not force you to put only related characteristics in a dimension
n Once the InfoCube is activated, the dimension table(s) are generated
n The dimension table consists of the key Dim ID and the SIDs of the characteristic(s) assigned to the dimension
C u s tom e r D i m e n s i o n T a b le
D IM-ID
11223344556677
C u s t-S ID
1711171227113711471157116711
C o u n try-S ID
11112233445566
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 37
2 - Dimension Table Design Best Practices (cont’d)
Fact Table
Mat-GR-SID Mat-SID Mat-DIM-ID
910 001 111
910 002 222
920 002 666
920 003 333
920 004 444
920 005 555
Mat-GR-SID Mat-SID Mat-DIM-ID
910 001 111
910 002 222
920 002 666
920 003 333
920 004 444
920 005 555920 005 555
Mat Mat-SID
AAA 001
BBB 002
CCC 003
DDD 004
EEE 005
Material Grp SID
Mat-GR Mat-GR-SID
X 910
Y 920
Material SID
Mat-DIM-ID Time-DIM-ID Revenue
111 09/1998 100
222 09/1998 100
333 09/1998 100
444 09/1998 100
111 10/1998 100
222 10/1998 100
333 10/1998 100
444 10/1998 100
555 10/1998 100
Mat-DIM-ID Time-DIM-ID Revenue
111 09/1998 100
222 09/1998 100
333 09/1998 100
444 09/1998 100
111 10/1998 100
222 10/1998 100
333 10/1998 100
444 10/1998 100
555 555 10/10/19981998 100100
Material Dimension Table
Fact Table
EEE Y 10/1998 100Transaction record
Add new record to dim table
Add new recordto fact table
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 38
2 - Dimension Table Design Best Practices (cont’d)
112233
111111222222333333
Dim ID SID Material
Fact tableDimension table
Material not time dependentAttributes SID table(Name: /BIC/XMATERIAL)
Material not time dependentAttributes SID table(Name: /BIC/XMATERIAL)
Material MatGroup
AAACCCDDD
X Y Y
Material Master table(Name: /BIC/PMATERIAL)
Material Master table(Name: /BIC/PMATERIAL)
112233
10.00012.00025.000
Dim ID Sales
SID Material Material SID MatGroup
AAA CCC DDD
111111222222333333
345345678678678678
MatGroup SID MatGroup
X Y Z
345 678 999 MatGroup SID table
(Name: /BIC/SMATGROUP)
MatGroup SID table(Name: /BIC/SMATGROUP)Not used for Infocube access !
Example: Show me the sales values for material group X and Y
Not used in this Example :•Traditional Material SID Table: /BIC/SMATERIAL•Time dependent Material Master Table: /BIC/QMATERIAL•Material Time dependent Attributes SID Table: /BIC/YMATERIAL
Not used in this Example :•Traditional Material SID Table: /BIC/SMATERIAL•Time dependent Material Master Table: /BIC/QMATERIAL•Material Time dependent Attributes SID Table: /BIC/YMATERIAL
SID Tables for Infocube Access
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 39
Tip #3: Strategically Locate Dependent Attributes
n Where to model the dependant attributes: i.e., material group from materialn In the dimension as dimensional characteristicsn As navigational attributes from the materialn As a hierarchy from the material
Each of these scenarios can offer very different reporting views
Note
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 40
Tip #4: Monitor Your InfoCubes
n You can analyze your InfoCubes in BW to improve performancen load timen Roll-up time (aggregate build)n compression timen query timen Dim and fact table sizing, etc.
It’s very important to periodically analyze your queries and cubes to maintain optimal performanceNote
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 41
Tip #4: Monitor Your InfoCubes (cont’d)
n How to do itn Use transaction RSRV: Analysis on any object in BWn Use transaction RSRT: Query analysis tooln BW Statistics InfoCube
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 42
Agenda
InfoCube Design: Key Concepts
InfoCube Design: Issues Techniques
Tips and Tricks
9 Decision Points for Dimensional Data Warehouse Designè
èèè
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 43
9 Decision Points for Dimensional Data Warehouse Design
n The processes, and hence the identity, of the Fact Tables u one Fact Table - one InfoCube... -> intersection entities
n The dimensions of each Fact Table u strong entities
n The dimension attributes with complete descriptions and proper terminologyu attributes and entities
n The grain of each Fact Table
Source: Ralph Kimball “The Data Warehouse Toolkit”
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 44
Conclusion (cont’d)
n The nine design decision points for a dimensional DW (cont’d)
n The facts, including precalculated facts n How to track slowly changing dimensions n The aggregations, heterogeneous dimensions, mini-dimensions,
query modes and other physical storage decisionsn The historical duration of the database
u archiving aspects
n The urgency with which the data is extracted and loaded into thedata warehouse u time frame for loading
n Source: Ralph Kimball “The Data Warehouse Toolkit”
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 45
Your Turn!
Questions?
SAP AG 2002, Mastering InfoCube Design, Luis Orama, 46
n 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.
n Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
n Microsoft®, WINDOWS®, NT®, EXCEL®, Word®, PowerPoint® and SQL Server® are registered trademarks of Microsoft Corporation.
n IBM®, DB2®, DB2 Universal Database, OS/2®, Parallel Sysplex®, MVS/ESA, AIX®, S/390®, AS/400®, OS/390®, OS/400®, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere®, Netfinity®, Tivoli®, Informix and Informix® Dynamic ServerTM are trademarks of IBM Corporation in USA and/or other countries.
n ORACLE® is a registered trademark of ORACLE Corporation.
n UNIX®, X/Open®, OSF/1®, and Motif® are registered trademarks of the Open Group.
n Citrix®, the Citrix logo, ICA®, Program Neighborhood®, MetaFrame®, WinFrame®, VideoFrame®, MultiWin® and other Citrix product names referenced herein are trademarks of Citrix Systems, Inc.
n HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.
n JAVA® is a registered trademark of Sun Microsystems, Inc.
n JAVASCRIPT® is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.
n MarketSet and Enterprise Buyer are jointly owned trademarks of SAP AG and Commerce One.
n SAP, SAP Logo, R/2, R/3, mySAP, mySAP.com 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 in several other countries all over the world. All other product and service names mentioned are trademarks of their respective companies.
Copyright 2003 SAP AG. All Rights Reserved