Learn SAP HANA Modeling using sample eFashion

Transcription

Learn SAP HANA Modeling using sample eFashion
[
Learn SAP HANA Modeling using
sample eFashion Database
Dhirendra Gehlot
[ Learning Points
Quickly learn HANA modeling using eFashion data model
Quickly build eFashion universe using HANA model
Compare and contrast eFashion HANA model/UNX universe
with sample MS Access based eFashion universe
Real Experience. Real Advantage.
2
[ Agenda
eFashion Database and Universe Overview
SAP HANA Modeling Process Overview
Build HANA Model using eFashion Database
Build Universe using HANA Model
Compare and Contrast
Real Experience. Real Advantage.
3
[ eFashion Universe Classes and Objects
Sample Universe/MS Access Database
Dimensions
Time period
Store
Product
Product Color
Promotions
Facts
Sales
Promotions
Real Experience. Real Advantage.
4
[ eFashion Universe Structure
Real Experience. Real Advantage.
5
[ Agenda
eFashion Database and Universe Overview
SAP HANA Modeling Process Overview
Build HANA Model using eFashion Database
Build Universe using HANA Model
Compare and Contrast
Real Experience. Real Advantage.
6
[ SAP HANA Modeling Process Overview
1.
2.
3.
4.
5.
6.
7.
Create eFashion Schema and Tables
Load Sample Data
Create HANA Model Package
Create Attribute Views for each dimensions
Create Analytic View for Sales
Create Analytic View for Promotions
Create a Calculation View combining Sales and Promotions
Real Experience. Real Advantage.
7
[ 1. Create eFashion Schema and Tables
Launch SQL Editor from HANA Studio
Run SQL Command to create schema
CREATE SCHEMA EFASHION;
Run SQL Commands to create tables
Six(6) Dimension Tables
Two(2) Fact Tables
CREATE COLUMN TABLE EFASHION.OUTLETS…
Real Experience. Real Advantage.
8
[ 2. Load Sample Data
Several options for Data Load
Run SQL Commands to insert data into EFASHION schema
INSERT INTO ….
INSERT INTO EFASHION.ARTICLE_LOOKUP values (119427,'Stole and Feather Boa Set','Jewelry',110,'Accessories','F60');
INSERT INTO EFASHION.CALENDER_YEAR_LOOKUP VALUES(1,1,1999,'FY99','1999/01',1,'January',1,'n');
….
Bulk Data Load from CSV file
Data Services
Real Experience. Real Advantage.
9
[ 3. Create HANA Package
Create HANA Package
Select Content folder
Right Mouse Click > New > Package
Provide Package Definition
Real Experience. Real Advantage.
10
[ 4. Create Attribute View for Time Dimension
Select efashionsample package
Right Click > New > Attribute View
Provide View Definition
Next
Select Calendar_Year_Lookup table
Finish
Add Attributes
Select WEEK_ID > Right click
Add as Key Attribute
Add all other fields as Attributes
Save and Activate
Data Preview
Real Experience. Real Advantage.
11
[ 4. Create Attribute View for Time Dimension
Select efashionsample package
Right Click > New > Attribute View
Provide View Definition
Next
Select Calendar_Year_Lookup table
Finish
Add Attributes
Select WEEK_ID > Right click
Add as Key Attribute
Add all other fields as Attributes
Save and Activate
Data Preview
Real Experience. Real Advantage.
12
[ 4. Create Attribute View for Time Dimension
Select efashionsample package
Right Click > New > Attribute View
Provide View Definition
Next
Select Calendar_Year_Lookup table
Finish
Add Attributes
Select WEEK_ID > Right click
Add as Key Attribute
Add all other fields as Attributes
Save and Activate
Data Preview
Real Experience. Real Advantage.
13
[ 4. Create Attribute View for Time Dimension
Select efashionsample package
Right Click > New > Attribute View
Provide View Definition
Next
Select Calendar_Year_Lookup table
Finish
Add Attributes
Select WEEK_ID > Right click
Add as Key Attribute
Add all other filed as Attributes
Save and Activate
Data Preview
Real Experience. Real Advantage.
14
[ 4. Create Attribute View for Time Dimension
Select efashionsample package
Right Click > New > Attribute View
Provide View Definition
Next
Select Calendar_Year_Lookup table
Finish
Add Attributes
Select WEEK_ID > Right click
Add as Key Attribute
Add all other filed as Attributes
Save and Activate
Data Preview
Real Experience. Real Advantage.
15
[ 4. Create Attribute View for Time Dimension
Select efashionsample package
Right Click > New > Attribute View
Provide View Definition
Next
Select Calendar_Year_Lookup table
Finish
Add Attributes
Select WEEK_ID > Right click
Add as Key Attribute
Add all other fields as Attributes
Save and Activate
Data Preview
Real Experience. Real Advantage.
16
[ 4. Create Attribute View for Time Dimension
Select efashionsample package
Right Click > New > Attribute View
Provide View Definition
Next
Select Calendar_Year_Lookup table
Finish
Add Attributes
Select WEEK_ID > Right click
Add as Key Attribute
Add all other fields as Attributes
Save and Activate
Data Preview
Real Experience. Real Advantage.
17
[ 4. Create Attribute View for Time Dimension
Select efashionsample package
Right Click > New > Attribute View
Provide View Definition
Next
Select Calendar_Year_Lookup table
Finish
Add Attributes
Select WEEK_ID > Right click
Add as Key Attribute
Add all other fields as Attributes
Save and Activate
Data Preview
Real Experience. Real Advantage.
18
[ 4. Create Attribute Views for Store Dimension
Follow similar process to Create Attribute Views for remaining
Dimensions
Store
Product
Product Color
Promotions
Real Experience. Real Advantage.
19
[ 4. Create Attribute Views for Product Dimension
Follow similar process to Create Attribute Views for remaining
Dimensions
Store
Product
Product Color
Promotions
Real Experience. Real Advantage.
20
[ 4. Create Attribute Views for Product Color Dimension
Follow similar process to Create Attribute Views for remaining
Dimensions
Store
Product
Product Color
Promotions
Real Experience. Real Advantage.
21
[ 4. Create Attribute Views for Promotions Dimension
Follow similar process to Create Attribute Views for remaining
Dimensions
Store
Product
Product Color
Promotions
Real Experience. Real Advantage.
22
[ 5. Create Analytic View for Shop Facts
Select efashionsample package
Right Click > New > Analytic View
Provide View Definition
Next, Select SHOP_FACT table
Next, Select Dimensions
Finish
Add Attributes
SHOP_FACT_ID, ARTICLE_ID, COLOR_CODE, WEEK_ID, SHOP_ID
Add Measures
MARGIN, AMOUNT_SOLD, QUANTITY
Create Calculated Measures
Join Fact Table and Dimensions
Save and Activate
Data Preview
Real Experience. Real Advantage.
23
[ 5. Create Analytic View for Shop Facts
Select efashionsample package
Right Click > New > Analytic View
Provide View Definition
Next, Select SHOP_FACT table
Next, Select Dimensions
Finish
Add Attributes
SHOP_FACT_ID, ARTICLE_ID, COLOR_CODE, WEEK_ID, SHOP_ID
Add Measures
MARGIN, AMOUNT_SOLD, QUANTITY
Create Calculated Measures
Join Fact Table and Dimensions
Save and Activate
Data Preview
Real Experience. Real Advantage.
24
[ 5. Create Analytic View for Shop Facts
Select efashionsample package
Right Click > New > Analytic View
Provide View Definition
Next, Select SHOP_FACT table
Next, Select Dimensions
Finish
Add Attributes
SHOP_FACT_ID, ARTICLE_ID, COLOR_CODE, WEEK_ID, SHOP_ID
Add Measures
MARGIN, AMOUNT_SOLD, QUANTITY
Create Calculated Measures
Join Fact Table and Dimensions
Save and Activate
Data Preview
Real Experience. Real Advantage.
25
[ 5. Create Analytic View for Shop Facts
Select efashionsample package
Right Click > New > Analytic View
Provide View Definition
Next, Select SHOP_FACT table
Next, Select Dimensions
Finish
Add Attributes
SHOP_FACT_ID, ARTICLE_ID, COLOR_CODE, WEEK_ID, SHOP_ID
Add Measures
MARGIN, AMOUNT_SOLD, QUANTITY
Create Calculated Measures
Join Fact Table and Dimensions
Save and Activate
Data Preview
Real Experience. Real Advantage.
26
[ 5. Create Analytic View for Shop Facts
Select efashionsample package
Right Click > New > Analytic View
Provide View Definition
Next, Select SHOP_FACT table
Next, Select Dimensions
Finish
Add Attributes
SHOP_FACT_ID, ARTICLE_ID, COLOR_CODE, WEEK_ID, SHOP_ID
Add Measures
MARGIN, AMOUNT_SOLD, QUANTITY
Create Calculated Measures
Join Fact Table and Dimensions
Save and Activate
Data Preview
Real Experience. Real Advantage.
27
[ 5. Create Analytic View for Shop Facts
Select efashionsample package
Right Click > New > Analytic View
Provide View Definition
Next, Select SHOP_FACT table
Next, Select Dimensions
Finish
Add Attributes
SHOP_FACT_ID, ARTICLE_ID, COLOR_CODE, WEEK_ID, SHOP_ID
Add Measures
MARGIN, AMOUNT_SOLD, QUANTITY
Create Calculated Measures
Join Fact Table and Dimensions
Save and Activate
Data Preview
Real Experience. Real Advantage.
28
[ 5. Create Analytic View for Shop Facts
Select efashionsample package
Right Click > New > Analytic View
Provide View Definition
Next, Select SHOP_FACT table
Next, Select Dimensions
Finish
Add Attributes
SHOP_FACT_ID, ARTICLE_ID, COLOR_CODE, WEEK_ID, SHOP_ID
Add Measures
MARGIN, AMOUNT_SOLD, QUANTITY
Create Calculated Measures
Join Fact Table and Dimensions
Save and Activate
Data Preview
Real Experience. Real Advantage.
29
[ 5. Create Analytic View for Shop Facts
Select efashionsample package
Right Click > New > Analytic View
Provide View Definition
Next, Select SHOP_FACT table
Next, Select Dimensions
Finish
Add Attributes
SHOP_FACT_ID, ARTICLE_ID, COLOR_CODE, WEEK_ID, SHOP_ID
Add Measures
MARGIN, AMOUNT_SOLD, QUANTITY
Create Calculated Measures
Join Fact Table and Dimensions
Save and Activate
Data Preview
Real Experience. Real Advantage.
30
[ 5. Create Analytic View for Shop Facts
Select efashionsample package
Right Click > New > Analytic View
Provide View Definition
Next, Select SHOP_FACT table
Next, Select Dimensions
Finish
Add Attributes
SHOP_FACT_ID, ARTICLE_ID, COLOR_CODE, WEEK_ID, SHOP_ID
Add Measures
MARGIN, AMOUNT_SOLD, QUANTITY
Create Calculated Measures
Join Fact Table and Dimensions
Save and Activate
Data Preview
Real Experience. Real Advantage.
31
[ 5. Create Analytic View for Shop Facts
Select efashionsample package
Right Click > New > Analytic View
Provide View Definition
Next, Select SHOP_FACT table
Next, Select Dimensions
Finish
Add Attributes
SHOP_FACT_ID, ARTICLE_ID, COLOR_CODE, WEEK_ID, SHOP_ID
Add Measures
MARGIN, AMOUNT_SOLD, QUANTITY
Create Calculated Measures
Join Fact Table and Dimensions
Save and Activate
Data Preview
Real Experience. Real Advantage.
32
[ 6. Create Analytic Views for Promotion Fact
Follow similar process to Create Analytic View for Promotion
Fact
Real Experience. Real Advantage.
33
[ 6. Create Analytic Views for Promotion Fact
Follow similar process to Create Analytic View for Promotion
Fact
Real Experience. Real Advantage.
34
[ 7. Create a Calc View to combine Sales and Promotions
Select efashionsample package
Right Click > New > Calculation View
Provide View Definition
Next, Select Analytic Views
Finish
Select UNION, Link views to UNION, Link UNION to OUTPUT
Select UNION and MAP elements
Select OUTPUT, and add Attributes and Measures
Save and Activate
Data Preview
Real Experience. Real Advantage.
35
[ 7. Create a Calc View to combine Sales and Promotions
Select efashionsample package
Right Click > New > Calculation View
Provide View Definition
Next, Select Analytic Views
Finish
Select UNION, Link views to UNION, Link UNION to OUTPUT
Select UNION and MAP elements
Select OUTPUT, and add Attributes and Measures
Save and Activate
Data Preview
Real Experience. Real Advantage.
36
[ 7. Create a Calc View to combine Sales and Promotions
Select efashionsample package
Right Click > New > Calculation View
Provide View Definition
Next, Select Analytic Views
Finish
Select UNION, Link views to UNION, Link UNION to OUTPUT
Select UNION and MAP elements
Select OUTPUT, and add Attributes and Measures
Save and Activate
Data Preview
Real Experience. Real Advantage.
37
[ 7. Create a Calc View to combine Sales and Promotions
Select efashionsample package
Right Click > New > Calculation View
Provide View Definition
Next, Select Analytic Views
Finish
Select UNION, Link views to UNION, Link UNION to OUTPUT
Select UNION and MAP elements
Select OUTPUT, and add Attributes and Measures
Save and Activate
Data Preview
Real Experience. Real Advantage.
38
[ 7. Create a Calc View to combine Sales and Promotions
Select efashionsample package
Right Click > New > Calculation View
Provide View Definition
Next, Select Analytic Views
Finish
Select UNION, Link views to UNION, Link UNION to OUTPUT
Select UNION and MAP elements
Select OUTPUT, and add Attributes and Measures
Save and Activate
Data Preview
Real Experience. Real Advantage.
39
[ 7. Create a Calc View to combine Sales and Promotions
Real Experience. Real Advantage.
40
[ 7. Create a Calc View to combine Sales and Promotions
Select efashionsample package
Right Click > New > Calculation View
Provide View Definition
Next, Select Analytic Views
Finish
Select UNION, Link views to UNION, Link UNION to OUTPUT
Select UNION and MAP elements
Select OUTPUT, and add Attributes and Measures
Save and Activate
Data Preview
Real Experience. Real Advantage.
41
[ 7. Create a Calc View to combine Sales and Promotions
Real Experience. Real Advantage.
42
[ 7. Create a Calc View to combine Sales and Promotions
Select efashionsample package
Right Click > New > Calculation View
Provide View Definition
Next, Select Analytic Views
Finish
Select UNION, Link views to UNION, Link UNION to OUTPUT
Select UNION and MAP elements
Select OUTPUT, and add Attributes and Measures
Save and Activate
Creates a database view or column view in schema _SYS_BIC
Name of the column view: _SYS_BIC.<PACKAGE>/<VIEW_NAME>
Data Preview
Real Experience. Real Advantage.
43
[ 7. Create a Calc View to combine Sales and Promotions
Real Experience. Real Advantage.
44
[ eFashion HANA Package/Model
Real Experience. Real Advantage.
45
[ Agenda
eFashion Database and Universe Overview
SAP HANA Modeling Terminology
SAP HANA Modeling Process Overview
Build HANA Model using eFashion Database
Build Universe using HANA Model
Compare and Contrast
Real Experience. Real Advantage.
46
[ Build Universe using HANA Model
Launch Information Design Tool (IDT)
Create a Repository Connection to HANA Database
Create a Project
Create a Short Cut for Connection
Create Data Foundation Layer
Create Business Layer
Publish Business Layer to the Enterprise
Real Experience. Real Advantage.
47
[ Build Universe using HANA Model
Launch Information Design Tool (IDT)
Create a Repository Connection to HANA
Create a Project
Create a Short Cut for Connection
Create Data Foundation Layer
_SYS_BIC.<PACKAGE>/<VIEW_NAME>
Create Business Layer
Publish Business Layer to the Enterprise
Real Experience. Real Advantage.
48
[ Build Universe using HANA Model
Launch Information Design Tool (IDT)
Create a Repository Connection to HANA
Create a Project
Create a Short Cut for Connection
Create Data Foundation Layer
Create Business Layer
Publish Business Layer to the Enterprise
Real Experience. Real Advantage.
49
[ Build Universe using HANA Model
Launch Information Design Tool (IDT)
Create a Repository Connection to HANA
Create a Project
Create a Short Cut for Connection
Create Data Foundation Layer
Create Business Layer
Publish Business Layer to the Enterprise
Real Experience. Real Advantage.
50
[ Agenda
eFashion Database and Universe Overview
SAP HANA Modeling Process Overview
Build HANA Model using eFashion Database
Build Universe using HANA Model
Compare and Contrast
Real Experience. Real Advantage.
51
[ Universe Objects
eFashion on HANA
Real Experience. Real Advantage.
eFashion on MS Access
52
[ Universe Structure
eFashion on HANA
Real Experience. Real Advantage.
eFashion on MS Access
53
[ Universe Objects Definitions
eFashion on HANA
eFashion on MS Access
State
State
Sales Revenue
Sales Revenue
Real Experience. Real Advantage.
54
[ Universe
eFashion on HANA
eFashion on MS Access
No Summary Tables
No Joins
No Contexts
No Calculated object
No Use of @Aggragate_Aware() Function
No Database Index
One-to-one mapping to Calc View output
Summary Tables
Joins
Shop and Promotion Contexts
Calculated Objects/Measures
Use of @Aggragate_Aware() function
Database Index required to improve
performance
Real Experience. Real Advantage.
55
[ Learning Points
Quickly learn HANA modeling using eFashion data model
Quickly build eFashion universe using HANA model
Compare and contrast eFashion HANA model/UNX universe
with sample MS Access based eFashion universe
Real Experience. Real Advantage.
56
[
]
Thank you for participating.
Please remember to complete and return your
evaluation form following this session.
For ongoing education on this area of focus, visit the
Year-Round Community page at www.asug.com/yrc
[
Real Experience. Real Advantage.
SESSION CODE: 0213
57