hana modeling using sample efashion database

Upload: vganesh69663131087

Post on 10-Feb-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    1/57

    Learn SAP HANA Modeling using

    sample eFashion DatabaseDhirendra Gehlot

    [

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    2/57

    [ Learning Points

    Quickly learn HANA modeling using eFashion data model

    Quickly build eFashion universe using HANA model

    Compare and contrast eFashion HANA model/UNX universewith sample MS Access based eFashion universe

    Real Experience. Real Advantage. 2

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    3/57

    [ 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

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    4/57

    [ eFashion Universe Classes and Objects

    Sample Universe/MS Access Database

    Dimensions

    Time period Store

    Product

    Real Experience. Real Advantage. 4

    ro uct o or Promotions

    Facts

    Sales

    Promotions

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    5/57

    [ eFashion Universe Structure

    Real Experience. Real Advantage. 5

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    6/57

    [ 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

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    7/57

    [ SAP HANA Modeling Process Overview

    1. Create eFashion Schema and Tables

    2. Load Sample Data

    3. Create HANA Model Package4. Create Attribute Views for each dimensions

    5. Create Analytic View for Sales

    Real Experience. Real Advantage. 7

    6. Create Analytic View for Promotions7. Create a Calculation View combining Sales and Promotions

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    8/57

    [ 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

    Real Experience. Real Advantage. 8

    wo act a es

    CREATE COLUMN TABLE EFASHION.OUTLETS

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    9/57

    [ 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');

    .

    Real Experience. Real Advantage. 9

    Bulk Data Load from CSV file

    Data Services

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    10/57

    [ 3. Create HANA Package

    Create HANA Package Select Content folder

    Right Mouse Click > New > Package

    Provide Package Definition

    Real Experience. Real Advantage. 10

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    11/57

    [ 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

    Real Experience. Real Advantage. 11

    Add Attributes

    Select WEEK_ID > Right click

    Add as Key Attribute

    Add all other fields as Attributes

    Save and Activate

    Data Preview

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    12/57

    [ 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

    Real Experience. Real Advantage. 12

    Add Attributes

    Select WEEK_ID > Right click

    Add as Key Attribute

    Add all other fields as Attributes

    Save and Activate

    Data Preview

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    13/57

    [ 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

    Real Experience. Real Advantage. 13

    Add Attributes

    Select WEEK_ID > Right click

    Add as Key Attribute

    Add all other fields as Attributes

    Save and Activate Data Preview

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    14/57

    [ 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

    Real Experience. Real Advantage. 14

    Add Attributes

    Select WEEK_ID > Right click

    Add as Key Attribute

    Add all other filed as Attributes

    Save and Activate Data Preview

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    15/57

    [ 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

    Real Experience. Real Advantage. 15

    Add Attributes

    Select WEEK_ID > Right click

    Add as Key Attribute

    Add all other filed as Attributes

    Save and Activate Data Preview

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    16/57

    [ 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

    Real Experience. Real Advantage. 16

    Add Attributes Select WEEK_ID > Right click

    Add as Key Attribute

    Add all other fields as Attributes

    Save and Activate Data Preview

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    17/57

    [ 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

    Real Experience. Real Advantage. 17

    Add Attributes Select WEEK_ID > Right click

    Add as Key Attribute

    Add all other fields as Attributes

    Save and Activate

    Data Preview

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    18/57

    [ 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

    Real Experience. Real Advantage. 18

    Add Attributes Select WEEK_ID > Right click

    Add as Key Attribute

    Add all other fields as Attributes

    Save and Activate Data Preview

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    19/57

    [ 4. Create Attribute Views for Store Dimension

    Follow similar process to Create Attribute Views for remainingDimensions

    Store

    Product

    Product Color

    Real Experience. Real Advantage. 19

    Promotions

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    20/57

    [ 4. Create Attribute Views for Product Dimension

    Follow similar process to Create Attribute Views for remainingDimensions

    Store

    Product

    Product Color

    Real Experience. Real Advantage. 20

    Promotions

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    21/57

    [ 4. Create Attribute Views for Product Color Dimension

    Follow similar process to Create Attribute Views for remainingDimensions

    Store Product

    Product Color

    Real Experience. Real Advantage. 21

    Promotions

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    22/57

    [ 4. Create Attribute Views for Promotions Dimension

    Follow similar process to Create Attribute Views for remainingDimensions

    Store Product

    Product Color

    Real Experience. Real Advantage. 22

    Promotions

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    23/57

    [ 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

    Real Experience. Real Advantage. 23

    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

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    24/57

    [ 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

    Real Experience. Real Advantage. 24

    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

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    25/57

    [ 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

    Real Experience. Real Advantage. 25

    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

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    26/57

    [ 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

    Real Experience. Real Advantage. 26

    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

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    27/57

    [ 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

    Real Experience. Real Advantage. 27

    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

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    28/57

    [ 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

    Real Experience. Real Advantage. 28

    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

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    29/57

    [ 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

    Real Experience. Real Advantage. 29

    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

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    30/57

    [ 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

    Real Experience. Real Advantage. 30

    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

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    31/57

    [ 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

    Real Experience. Real Advantage. 31

    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

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    32/57

    [ 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

    Real Experience. Real Advantage. 32

    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

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    33/57

    [ 6. Create Analytic Views for Promotion Fact

    Follow similar process to Create Analytic View for PromotionFact

    Real Experience. Real Advantage. 33

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    34/57

    [ 6. Create Analytic Views for Promotion Fact

    Follow similar process to Create Analytic View for PromotionFact

    Real Experience. Real Advantage. 34

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    35/57

    [ 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

    Real Experience. Real Advantage. 35

    Select UNION and MAP elements Select OUTPUT, and add Attributes and Measures

    Save and Activate

    Data Preview

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    36/57

    [ 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

    Real Experience. Real Advantage. 36

    Select UNION and MAP elements Select OUTPUT, and add Attributes and Measures

    Save and Activate

    Data Preview

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    37/57

    [ 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

    Real Experience. Real Advantage. 37

    Select UNION and MAP elements Select OUTPUT, and add Attributes and Measures

    Save and Activate

    Data Preview

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    38/57

    [ 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

    Real Experience. Real Advantage. 38

    Select UNION and MAP elements

    Select OUTPUT, and add Attributes and Measures

    Save and Activate

    Data Preview

    [

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    39/57

    [ 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

    Real Experience. Real Advantage. 39

    Select UNION and MAP elements

    Select OUTPUT, and add Attributes and Measures

    Save and Activate

    Data Preview

    [

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    40/57

    [ 7. Create a Calc View to combine Sales and Promotions

    Real Experience. Real Advantage. 40

    [

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    41/57

    [ 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

    Real Experience. Real Advantage. 41

    Select UNION and MAP elements

    Select OUTPUT, and add Attributes and Measures

    Save and Activate

    Data Preview

    [

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    42/57

    [ 7. Create a Calc View to combine Sales and Promotions

    Real Experience. Real Advantage. 42

    [

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    43/57

    [ 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

    Real Experience. Real Advantage. 43

    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./ Data Preview

    [

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    44/57

    [ 7. Create a Calc View to combine Sales and Promotions

    Real Experience. Real Advantage. 44

    [

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    45/57

    [ eFashion HANA Package/Model

    Real Experience. Real Advantage. 45

    [

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    46/57

    [ 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

    Real Experience. Real Advantage. 46

    Compare and Contrast

    [ B ld U HANA M d l

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    47/57

    [ 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

    Real Experience. Real Advantage. 47

    Publish Business Layer to the Enterprise

    [ B ild U i i HANA M d l

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    48/57

    [ 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./

    Real Experience. Real Advantage. 48

    Create Business Layer

    Publish Business Layer to the Enterprise

    [ B ild U i i HANA M d l

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    49/57

    [ 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

    Real Experience. Real Advantage. 49

    Publish Business Layer to the Enterprise

    [ B ild U i i HANA M d l

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    50/57

    [ 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

    Real Experience. Real Advantage. 50

    Publish Business Layer to the Enterprise

    [ Agenda

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    51/57

    [ 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

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    52/57

    [ Universe Objects

    eFashion on HANA eFashion on MS Access

    Real Experience. Real Advantage. 52

    [ Universe Structure

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    53/57

    [ Universe Structure

    eFashion on HANA eFashion on MS Access

    Real Experience. Real Advantage. 53

    [ Universe Objects Definitions

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    54/57

    [ Universe Objects Definitions

    eFashion on HANA eFashion on MS Access

    State State

    Real Experience. Real Advantage. 54

    Sales Revenue Sales Revenue

    [ Universe

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    55/57

    [ Universe

    eFashion on HANA eFashion on MS Access

    No Summary Tables

    No JoinsNo ContextsNo Calculated objectNo Use of @Aggragate_Aware() Function

    Summary Tables

    JoinsShop and Promotion ContextsCalculated Objects/MeasuresUse of @Aggragate_Aware() function

    Real Experience. Real Advantage. 55

    o a a ase n ex

    One-to-one mapping to Calc View output

    a a ase n ex requ re o mprove

    performance

    [ Learning Points

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    56/57

    [ Learning Points

    Quickly learn HANA modeling using eFashion data model

    Quickly build eFashion universe using HANA model

    Compare and contrast eFashion HANA model/UNX universewith sample MS Access based eFashion universe

    Real Experience. Real Advantage. 56

    [

    ]

  • 7/22/2019 HANA Modeling Using Sample eFashion Database

    57/57

    [

    ] Thank you for participating.SESSION CODE: 0213

    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. 57