100113-Gubar-Slides-OLAP Cubes and OBI EE

Embed Size (px)

Citation preview

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    1/31

    Make Oracle BI EE Smarter and Faster with Oracle OLAPCubes

    Marty GubarOracle BI/DW Product Management

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    2/31

    Agenda

    Introduction

    OLAP Calculations

    Value of dimensional metadata

    Solution scales with calculation complexity

    Accessing calculations thru SQL

    Creating Oracle Business Intelligence EE metadata

    Analyzing OLAP cubes thru OBIEE Answers

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    3/31

    Oracle OLAP 11gIntroduction

    Improve the delivery of information rich queries bySQL-based business intelligence tools andapplications

    Simple definition of analytic calculations

    Simple access to analytic calculations

    Fast performance

    Leverage existing Oracle Database expertise

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    4/31

    Oracle Database 11gThe Optimal Information Platform

    Cohesive, integrated databaseplatform

    Secure, highly available,scalable and manageable

    Rich analytic platform

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    5/31

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    6/31

    Oracle Database MetadataTable Relationships

    SALES FACT

    TIME

    INVENTORY

    REGION

    CUST

    ITEM

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    7/31

    Column RelationshipsNot Captured in Tables Metadata

    SALES FACT

    TIME

    INVENTORY

    REGION

    CUST

    ITEM

    ITEM

    item_key type_key cat_key

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    8/31

    Value of Dimensional MetadataDimensions Formalize Data Relationships

    Product

    Geography

    Time

    SALES FACT

    TIME

    INVENTORY

    REGION

    CUST

    ITEM

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    9/31

    Value of Dimensional MetadataDimensions Formalize Data Relationships

    Product

    Geography

    Time

    SALES FACT

    TIME

    INVENTORY

    REGION

    CUST

    ITEM

    ProductLevel-based Hierarchy

    Item

    Type

    Category

    Define the businessrelationships

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    10/31

    Value of Dimensional MetadataDimensions Formalize Data Relationships

    Geography

    Time

    SALES FACT

    TIME

    INVENTORY

    REGION

    CUST

    ITEM

    ProductComplex Hierarchy

    Model complexhierarchical relationships

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    11/31

    Parent

    ChildrenDescendants

    Value of Dimensional MetadataDimensions Formalize Data Relationships

    Geography

    Time

    SALES FACT

    TIME

    INVENTORY

    REGION

    CUST

    ITEM

    ProductHierarchical Relationships

    Use family references tosimplify calculations

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    12/31

    Value of Dimensional MetadataTime Dimension Supports Any Calendar Type

    Product

    Geography

    Time

    SALES FACT

    TIME

    INVENTORY

    REGION

    CUST

    ITEM Time dimension simplifiestime-series calculations

    MARC

    H

    Sun Mon Tue Wed Thu Fri Sat

    1 2 3 4 5 6 7

    8 9 10 11 12 13 14

    15 16 17 18 19 20 21

    22 23 24 25 26 27 28

    29 30 31 Fiscal Year End

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    13/31

    Value of Dimensional MetadataDimensions Shared Across Cubes

    Product

    Sales Cube

    Inventory Cube

    SALES FACT

    TIME

    INVENTORY

    REGION

    CUST

    ITEM

    Time

    Geography

    Product

    Time

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    14/31

    Value of Dimensional MetadataAggregation Rules

    Product

    Sales Cube

    Inventory Cube

    Aggregation Rules

    Product: SumGeography: SumTime: Sum

    Aggregation Rules

    Product: SumTime: Hierarchical Last

    SALES FACT

    TIME

    INVENTORY

    REGION

    CUST

    ITEM

    Time

    Geography

    Product

    Time

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    15/31

    Value of Dimensional MetadataAnalytic Calculations Leverage Metadata

    Calculations Sales YTD YTD Growth Market Share Product Alert Moving Average

    Calculations Balance Inventory Cost

    Stock Out

    SALES FACT

    TIME

    INVENTORY

    REGION

    CUST

    ITEM

    Product

    Sales Cube

    Inventory Cube

    Time

    Geography

    Product

    Time

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    16/31

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    17/31

    Calculation Glide-PathSolution Scales with Calculation Complexity

    Calculation definition options support most anyanalytic calculation requirements:

    1. Calculation Templates

    2. Calculation Expression Syntax

    3. OLAP DML Programs, Functions and Models

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    18/31

    Calculation Templates

    Choose from a wide range of common business calculations

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    19/31

    Calculation Expression Syntax

    OLAP Expression Syntax: Patterned after SQL analytic and window functions

    Extended to leverage unique properties of OLAP model

    Can leverage OLAP DML code

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    20/31

    Calculation Expression SyntaxSimilarity to Standard SQL Syntax

    Identical to SQL syntax for:

    Single Row Functions

    Approximately 90 single row functions are identical to SQL

    Examples: nvl, nullif, to_date, ||, replace, etc.

    Conditional Statements Supports standard comparative operators

    Examples: case, decode, =, !=, etc.

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    21/31

    Calculation Expression SyntaxSQL Syntax Extended for OLAP Metadata

    Enables a single calculation to span various levels ofaggregation

    Leverages native understanding of hierarchical relationships

    Requires no densification for time-series calculations

    Includes the following functions:

    MAX

    MIN

    RANK

    ROW_NUMBER

    SHARE

    SUM

    AVERAGE_RANK

    AVG

    COUNT

    DENSE_RANK

    HIER_ANCESTOR

    HIER_CHILD_COUNT

    HIER_DEPTH

    HIER_LEVEL

    HIER_PARENT

    HIER_TOP

    LAG

    LAG_VARIANCE

    LAG_VARIANCE_PERCENT

    LEAD

    LEAD_VARIANCE

    LEAD_VARIANCE_PERCENT

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    22/31

    Calculation Expression SyntaxExample of Extended SQL Syntax

    Window function example (RANK) One OLAP Expression is equivalent to several SQL rank

    expressions

    --OLAP

    - Rank within parent at any level

    RANK()OVER HIERARCHY

    (PRODUCT.STANDARD ORDER BY SALES_CUBE.QUANTITY DESC NULLS

    LASTWITHIN PARENT)

    --SQL

    --Rank departments

    RANK() OVER (PARTITION BY total_product_id ORDER BY sales DESC NULLS LAST)

    --Rank categories

    RANK() OVER (PARTITION BY department_id ORDER BY sales DESC NULLS LAST)

    --Rank types

    RANK() OVER (PARTITION BY category_id ORDER BY sales DESC NULLS LAST)--Rank sub types

    RANK() OVER (PARTITION BY type_id ORDER BY sales DESC NULLS LAST)

    -- Rank items

    RANK() OVER (PARTITION BY sub_type_id ORDER BY sales DESC NULLS LAST)

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    23/31

    Calculations Using OLAP DML

    OLAP DML is a dimensionally aware procedural programminglanguage

    Supports looping, conditional logic, multidimensionalselection and more

    Includes hundreds of analytic functions

    OLAP DML can be used:

    Within a custom measure expression

    To assign data to stored measures within a cube

    Forecasts

    Allocations Systems of expressions (a.k.a models)

    Assignments based on user defined expressions

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    24/31

    Calculations Using OLAP DMLExample: Forecast

    Scope the forecast

    limit geography to geography_levelrel eq 'REGION'

    limit product to product_levelrel eq 'TYPE'

    limit channel to 'ALL_CHANNELS'

    limit time to time_levelrel eq 'MONTH

    "Set forecast parameters for 'best fit'fcset _handle APPROACH 'APPAUTO' periodicity 12 histperiods 36

    "Execute the best-fit forecast

    FCEXEC _handle time time INTO forecast_best_fit -

    seasonal forecast_seasonal -

    smseasonal forecast_smseasonal backcast -

    sales_cube_sales

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    25/31

    Calculations Using OLAP DMLExample: Product Alert

    Look at product sales for the children of the current product

    Have they fallen compared to last year?

    limit product to children using product_parentrel _product

    limit product keep SALES_CUBE_SALES_PY_PCT_CHG lt 0

    If any products meet the criteria return TRUE (an alert)if statlen(product) gt 0

    then return true

    else return false

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    26/31

    Cube ViewsAutomatically Synchronized with Cubes

    Web Analysis

    Smart Search

    Smart Space

    Desktop Gadgets

    SmartView

    Custom Application(SOAP, J2EE, .NetMDX, etc.)

    Hyperion VisualExplorer

    INVENTORY CUBE

    GEOGRAPHY

    TIME

    PRODUCT

    SALES CUBE

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    27/31

    Comparing "Star" Models

    Time_View

    Channel_ViewProduct_View

    Geography_View

    Sales_Cube_View

    Single cube view contains manysummary levels

    Calculations exposed ascolumns and computed in OLAPengine

    ChannelsProducts

    Geographies

    Sales_Fact

    Times

    Fact table contains leaf data

    Calculations computed inrelational engine using functionsin select list

    TABLESCUBE VIEWS

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    28/31

    Generate OBIEE Metadata Over CubesAWM Plug-in Automates Process

    Export cube metadata toOBIEE Administrator

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    29/31

    OBIEE Answers Leverages OLAPCalculations Computed in OLAP Engine

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    30/31

    Demonstrations

    Demo

    1. Create Calculations Using AWM

    2. Query Cube Using SQL

    3. Create an OBIEE Repository over Cubes4. Query Cubes Using OBIEE Answers

  • 8/8/2019 100113-Gubar-Slides-OLAP Cubes and OBI EE

    31/31

    For More Information

    search.oracle.com

    Oracle OLAP

    Oracle Technology NetworkFor demonstrations, white papers, tutorials and more, visit:

    http://www.oracle.com/technology/products/bi/olap/olap.html

    http://www.oracle.com/technology/products/bi/olap/olap.htmlhttp://www.oracle.com/technology/products/bi/olap/olap.htmlhttp://www.oracle.com/technology/products/bi/olap/olap.html