Sample Sales Re Engineering in OBIEE 11g Part II

Embed Size (px)

Citation preview

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    1/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    Sample Sales Reengineering in OBIEE 11g Part II

    This is one of our documents from OBIEE for Beginners series. The document shows how to rebuild

    the sample sales rpd, reports and dashboard shipped with OBIEE10g. The Sample Sales RPD, Reports

    and Dashboard is designed such a way that it covers all the import features of OBIEE. The document

    contents the BEST technique to learn OBIEE Repository Building. Join our professional training program

    to learn OBIEE from the experts.

    History:

    Version Description Change Author Publish Date

    0.1 Initial Draft Hitesh Mankar 10th Jan 2011

    0.1 1stReview Amit Sharma 10th Jan 2011

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 1

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    2/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    Table of Contents

    Sample Sales Reengineering in OBIEE 11g Part I

    1. Understanding the Data Model

    Dimension and Fact Tables details

    Relationship Diagram

    2. Building Physical Layer

    Importing Metadata from Sources

    Creating Alias Tables

    Creating Physical Model

    Sample Sales Reengineering in OBIEE 11g Part II

    3. Building BMM layer

    Creating Logical Dimension Table

    Creating Logical Table Sources (Multiple)

    Creating Dimension Hierarchies

    Creating Simple Measures

    Creating Repository Variables

    Creating Time series Measures

    Creating Rolling Measures

    Creating Level Based Measures

    Creating Derived Measures

    Creating Business Model Diagram

    Sample Sales Reengineering in OBIEE 11g Part III

    4. Building Presentation Layer

    Creating Presentation Catalogues

    Creating Presentation Tables

    Creating Presentation Columns

    5. Testing and Validating Repository

    Configuring RPD

    Creating Request

    View Logical Query

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 2

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    3/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    2.Building Business Model and Mapping Layer

    The business model simplifies the physical schema and maps the users business terms to physical

    sources. It represents the logical structure of the information in the repository. The business models

    contain logical columns arranged in logical tables, logical joins, and dimensional hierarchy definitions

    This layer also contains the mappings from the logical columns to the source data in the Physical layer

    means specifies the mapping between the business models and the Physical layer schemas.

    The goal of building business model is to define how users think about their business using their own

    business terms.

    1. Creating Logical Schema/ Business Model.

    Right click in the blank middle pane of the Oracle BI Administration Tool and select the New Business

    Model option. Specify a name samplesales for the business model.

    This schema is not ready for query, so its appeared with a red mark over on the schema icon.

    2. Creating Logical Tables.

    Now create new logical dimension and fact table.

    Right click on the logical schema select New Object Logical Table

    Create empty logical tables manually as per below list, without any source and column.

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 3

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    4/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    3. Creating Logical Table Sources.

    Create logical table sources for all the logical tables,

    3.1 Select a table (Here D0 Time table is selected) Right click, elect New Object Logical Table Source

    3.2 Now give a name for logical table sourceclick on the green + plus sign.

    3.3 In the next window select and expand the physical schema

    Select a physical table

    click on Selectbutton to make it logical table sources (here samplesales1 schema is expanded and A07 Time Day is

    selected).

    3.4 Check the new logical table source is mapped with physical table source.

    3.5 Check and verify into Business model and mapping layer the new logical table source under the

    logical table.

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 4

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    5/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    3.6 Now use above steps to create more required logical table sources, First create sources for

    dimension tables using below matrix, having Logical table name, logical table source name and physical

    table source to map. (Here logical table source B08 Time Mth is mapped with physical schema2

    samplesales2 B08 Time Mth and D0 Time, D1 Customer, D6 Dim Degenerated Facts having multiple

    logical table sources).

    Create Logical table sources for Fact Tables

    3.7 Now create logical table sources for fact tables (Here F3 Rolling Measures logical table has three

    logical table sources and each logical table source is mapped with multiple physical table sources).

    Follow the steps from 3.1 to 3.5 to create logical table sources and map the logical table source from

    multiple physical table sources using add table source.

    When any logical table source is mapped with two physical table sources then joins were automatically

    detected with its type.

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 5

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    6/32

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    7/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    4.2) Now click on the Logical Table Source Select Column Mapping Tab (select Show unmapped

    ColumnsCheck the newly created logical column will appear).

    4.3) Click below Physical Table first to select the physical table for this current logical table source then

    click below of Expression to select the column from physical table.

    4.4) Go back to column properties Column Source, Check column source type Derived from Physica

    sources, you can see the mapping information to verify the mapping.

    4.5) Similarly create other logical columns and also can map one logical column form two logical table

    sources using step 4.3. Create new logical columns as per below given list.

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 7

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    8/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    Map all the columns as per given mapping information, here some columns were mapped from multiple

    logical table sources. Columns mapped from logical table sourcesA07 Time Day.

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 8

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    9/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    Columns mapped from logical table sourcesA08 Time Mth.

    Columns mapped from logical table sources B08 Time Mth.

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 9

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    10/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    4.6) Create logical columns for logical table D1 Customer and map columns as per below given list.

    Columns mapped from logical table sourcesA01 Customer.

    Columns mapped from logical table sourcesA09 Segment.

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 10

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    11/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    4.7) Create logical columns for logical table D2 Marketand map columns as per below given list.

    Columns mapped from logical table sourcesA02 Market.

    4.8) Create logical columns for logical table D3 Order and map columns as per below given list.

    Columns mapped from logical table sourcesA02 Market.

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 11

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    12/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    4.9) Create logical columns for logical table D4 Product and map columns as per below given list

    Columns mapped from logical table sources A05 Produ

    4.10) Create logical columns for logical table D5 Employee and map columns as per below given list

    Columns mapped from logical table sources A06 Employ

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 12

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    13/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    4.11) Create logical columns for logical table D6 Dim Degenerated Facts and map columns as per below

    given list.

    Columns mapped from logical table sources 11 Revenue (Billed Time Join).

    Columns mapped from logical table sources 12 Revenue (Booked Time Join).

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 13

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    14/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    5. Creating Dimension Hierarchies

    A Dimension Hierarchy allowing Oracle BI Server to calculate useful measures, allowing users to drill

    down for more details. For every dimension hierarchy you need to organize all dimension attributes in

    hierarchical levels which represent the organizational rules and reporting needs required by your

    business. These hierarchy levels provide the structure that Oracle BI Server uses to drill into and across

    dimensions to get more detailed views of the data. Levels of dimension hierarchy are used to perform

    aggregate navigation, configure level-based measure, calculations and determine what attributes appearwhen Oracle BI users drill down in their data requests.

    Each level has at least one logical key, the top level is marked as the grand total level, and you can drag

    other attributes in to each level and have OBI EE display those, rather than the level key, when users drill

    down in reports. At present, you have to create these dimensions manually when setting up your

    business model and mapping layer, although there is talk about automatically creating these when

    importing Oracle dimensions or OLAP structures.

    First of all Update All Rows Counts check how many rows in every table and last updated state. This

    will help you to define level number of members at this level for each level of all the hierarchies

    5.1 Now first step is to create a logical dimension hierarchy, create a logical dimension object. There are

    two methods to create logical dimension objects.

    Method1:- Right Click on the Business model in BMM layer select New Object Logical Dimension

    Dimension with Level Based Hierarchy.(Here structure is selected as Time because its a time dimension for

    other dimension hierarchies dont select Time as structure )

    Method2:- Right Click on a logical dimension table and select Create Dimension Dimension with Level-

    Based Hierarchy, this will create a dimension hierarchy for the selected dimension table

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 14

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    15/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    Let`s continue with Method1 to create dimension hierarchies.

    5.2 Start to add a logical level which is highest level of hierarchy. Right click on the logical dimension and

    select New Object Logical level.

    5.3 Give a name to this level select Grand Total Level, basically the first level should be grand total

    level. (Selecting the Grand total level check box is to indicate that this is the grand total level of thishierarchy).

    5.4 Now add a child level to dimension hierarchy.

    Right-click on the Parent level (Total) and select New Object Child Level.

    Give a name for the level and enter the Number of levels at this level.Now you need to identify the number of elements for each level. The number of elements represents the

    distinct count of rows for each level and is used by Oracle BI Server to determine the most efficient way to

    access data when picking aggregate sources. The number does not have to be exact, but ratios of numbers

    from one level to another should be accurate and you want to enter a larger number for child levels in

    respect to parent levels.

    Enter number of elements at this level from updated all row counts and ener value that how many rows

    year column contains.

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 15

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    16/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    5.5 Similarly add more child levels below this level as shown in below screen shot.

    5.6 Create Level Keys: - Level keys define the unique elements in each level and provide the context fordrill down. Each level needs to have one or more attributes that compose a level key. The level key defines

    the unique elements in each level and provides the context for drill down.

    A level may have more than one level key. When that is the case, you need to specify which key is the

    primary key of that level. All dimension sources that have aggregate content at a specified level need to

    contain the column that is the primary key of that level.

    To create Level keys drag a logical column which could be the key for that level.

    5.7 Double-click a level to open the level properties window Click the Keys tab and enter key name

    click on the primary keys dropdown select the key name to enable the edit and delete button .

    Then click on edit button to open the logical key dialog box for this level. Select a column form

    columns to create a key column for this level and select use for display click ok.

    5.8 Check out the changes and assigned key at the level click ok. The color of level key icon will change.

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 16

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    17/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    5.9 Similarly assign keys for each level using steps 4.6 to 4.8.

    5.10 Now just follow the above steps from 4.1 to 4.8 and create other dimension hierarchies, levels andlevel keys as per the below given screen shots.

    H1 Customer Hierarchy

    H2 Market Dimension Hierarchy

    H3 Order Dimension Hierarchy

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 17

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    18/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    H4 Product

    H5 Employee

    H6 Dim Fact Attributes Dimension Hierarchy

    (Right click on the level keyA-00 Order Keyclick on set icon select ghost icon to set.)

    6. Creating Repository Variables

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 18

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    19/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    Click on Manage option into Oracle BI Administration Tool select Variables, The variable manager

    window will open.

    Expand the Repository section Click on Static right click into right pan click on New Repository

    Variable, a Static Repository Variable window will open.

    Enter name for the variable Select Type and Enter Default Initializer value.

    Using above steps create two more static variables as shown below.

    7. Creating Measures (Logical Columns) into Fact tables.

    7.1) Creating a measure/ logical column without mapping with any source and column.

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 19

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    20/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    7.1.1) Right click on table select New Object Logical Column click on General tab enter name for

    the new measure or logical column.

    7.1.2) Click on Column Source Select Derived from existing column using an expression enter an

    expression click ok

    7.1.3) Right click on Set an Icon to recognize this column, choose paper icon and click ok.

    7.2) Creating a measure/ logical column Derived from physical columns mappings and applying Default

    Aggregation Rule. (Its similar to creating and mapping a new logical column from physical source and

    column).

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 20

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    21/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    7.2.1) Create a column and then select column source tab select Derived from physical source

    mappings. (Follow steps 4.1 to 4.4).

    7.2.2) Click on next tab Aggregation select an aggregation rule from Default aggregation rule

    dropdown list and click ok.

    7.2.3) The logical column icon will change its color automatically after applying the aggregation rule, this

    will show that any aggregation rule is applied on that column.

    7.3) Creating a measure/ logical column Derived from physical columns mappings and applying

    Aggregation Rule Based on Dimension Hierarchy.

    7.3.1) Create a column and then select column source tab select Derived from physical source

    mappings. (Follow steps 4.1 to 4.4).

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 21

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    22/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    7.3.2)Click on the Expression builder select and aggregate (aggregation rule) and click on the

    insert selected item

    7.3.3) Select logical tables from top left pane Categoryselect a fact table from Logical tables pane thenselect a measure from bottom pan click on click insert selected item arrow key

    and click ok.

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 22

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    23/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    7.3.4) Check out the aggregation expression formula in Aggregation tab

    7.3.5) Click on green plus sign to add more formula based on logical dimension

    7.4) Creating Time Series Measures

    CreatingAgo Measurefirst of all you need to identify Time Dimension and set Chronological Key.

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 23

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    24/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    7.4.1) Here H0 Time is a time dimension double click on HO Time Dimension and select Time in the

    structure section and also set chronological key for all its levels as shown in the below screen shot.

    7.4.2) Create a new logical column and select Derived from existing logical column using an expression

    click on Edit Expression button .

    7.4.3) select Function from category pane Time Series from Function and Ago from Time Series

    Functions.

    7.4.4) Select Logical Tables from category Select a logical table from Logical Tables select a column

    from columns then click on Measures in Ago function expressionClick insert Selected Items .

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 24

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    25/32

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    26/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    7.4.6) Check the new derived column and its expression.

    Creating To date Measure

    7.4.7) Create a new logical column and select Derived from existing logical column using an expression

    click on Edit Expression button.

    7.4.8) select Function from category pane Time Series from Function and TODATE from Time Series

    Functions.

    7.4.9) Select Logical Tables from category

    Select a logical table from Logical Tables

    select a columnfrom columns then click on Measures in TODATE function expressionClick insert Selected Items .

    7.4.10) Now select Time Dimension from CategorySelect Time Dimension name from Time

    DimensionsSelect a level of dimension from bottom pane Click on Level and then click Insert

    Selected Items .

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 26

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    27/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    7.5) Creating a measure/ logical column from existing logical columns,Repository Variablesand usingDisplay Function Filter.

    7.5.1) Create a new logical column and select Derived from existing logical column using an expression

    click on Edit Expression button.

    7.5.2) Select Function from category pane Display Function from Function and Filter from Display

    Functions.

    7.5.3) Select Logical Table from category panea Logical table from Logical tables Logical column

    from columns then Select click Insert Selected Items .

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 27

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    28/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    7.5.4) Select another column from logical table Click on after Using and click Insert Selected

    Items now enter a minus sign (-) { to subtract values of one column from another column} and

    follow the same step to insert another column.

    (Similarly you can apply or use more mathematical functions like division, addition, multiplication etc.)

    7.5.6). Now add a less than sign (

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    29/32

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    30/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    7.6.2) Select Functions from category Select Calendar Date/ Time functions from

    functionsTimestampDiff from Calendar Date/ Time functions Select from CASTfunction and click on Insert selected items.

    7.6.3) Select Interval and type DAY

    select a logical column and click on firsttimestampExpr

    and clickon Insert selected items.

    Select a logical column and click on second timestampExpr and click on Insert selected items.

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 30

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    31/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    7.6.4) Select Types from Category Double from Types click on and click on Insert

    selected items and add +1 after bracket

    7.7) Creating a measure/ logical column derived from existing logical columns using Conversion

    Function and Calender Date/ Time Function and EXTRCT. Type extract before the syntax.

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com | Business Intelligence Solution Providers 31

  • 8/6/2019 Sample Sales Re Engineering in OBIEE 11g Part II

    32/32

    Learnhyperion.wordpress.com http://learnoraclebi.wordpress.com/

    8).Creating Business Model Diagram

    Create business/ logical model diagram using relationships between dimension and fact tables as

    below diagram.