55
T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com Mark Rittman, Director, Rittman Mead For Oracle Development Tools User Group, January 2011 New RPD Modeling Features in OBIEE 11g 1 Thursday, 13 January 2011

Odtug Rittman Webcast Rpd11g

Embed Size (px)

Citation preview

Page 1: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Mark Rittman, Director, Rittman MeadFor Oracle Development Tools User Group, January 2011

New RPD Modeling Features in OBIEE 11g

1Thursday, 13 January 2011

Page 2: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Introductions

• Mark Rittman, Co-Founder of Rittman Mead• Oracle ACE Director, specialising in Oracle BI&DW• ODTUG Board Member• 14 Years Experience with Oracle Technology• Regular columnist for Oracle Magazine• Author of forthcoming Oracle Press book on OBIEE 11g• Writer for Rittman Mead Blog :http://www.rittmanmead.com/blog

• Email : [email protected]• Twitter : @markrittman

2Thursday, 13 January 2011

Page 3: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Rittman Mead

• Oracle BI&DW Project Specialists providing consulting, training and support• Clients in the UK, USA, Europe, Middle-East• Voted UKOUG BI Partner of the Year 2008• Group companies in USA and India• Visit our website for more details on us : http://www.rittmanmead.com

3Thursday, 13 January 2011

Page 4: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

The Rittman Mead Blog

• The longest-running Oracle blog, established in June 2003• http://www.rittmanmead.com/blog• Over 1300 postings• Covers Oracle tech, including‣ OBIEE ‣ OWB‣ Oracle Essbase‣ Oracle Database‣ BI Publisher‣ Fusion Middleware

• Early news on events• 10 authors

4Thursday, 13 January 2011

Page 5: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Questions This Presentation Will Answer

• What is the purpose of the OBIEE data model (repository, RPD)?• What are your objectives as a repository developer?• What are some good practices for developing a repository?• What are logical table sources, and federation, used for?• What are the new features in OBIEE 11gR1 for repository modeling?

5Thursday, 13 January 2011

Page 6: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Oracle Business Intelligence 11g

6Thursday, 13 January 2011

Page 7: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

How Oracle BI Generates Queries

• Queries (“Analyses”) come in via a dashboard• Passed on to the Oracle BI Server• Which maps them to a “semantic model”• Uses this to generate physical SQL + MDX• Passes to heterogeneous sources• Passes the results back as a

combined data set

7Thursday, 13 January 2011

Page 8: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

OBIEE Metadata and Data Layers

• The Web Catalog containsdefinitions of reports, alertsdashboards, KPIs, based on...

• A Semantic Model made upof Metrics, dimensions, hierarchies and calculations, derived from...

• Physical Data Sources, suchas relational databases,OLAP Cubes and applicationsource adapters

Enterprise Semantic Model

Relational, OLAP, File and Application Data Sources

Web Catalog

8Thursday, 13 January 2011

Page 9: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Flow of Data Through the Three-Layer Semantic Model

Simplification of the Data ModelIntegration of Disparate DataSources

Addition of Business Logic and Calculations

9Thursday, 13 January 2011

Page 10: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Semantic Model Design Objectives

• Create a simple, logical, dimensional model for users to query• Integrate where possible disparate data sources using conformed dimensions• Add dimensions and hierarchies to facilitate drilling to detail• Add common calculations and aggregations• Present data to users through subject areas (a.k.a. data marts)• Add role-based data and subject-area security

10Thursday, 13 January 2011

Page 11: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Step 1 : Importing Data Source Metadata

• Assuming source data is a DW, import metadata into enterprise semantic model• Create aliases that describe the role of each imported table, add additional

aliases for multiple roles played by tables (i.e. time, person etc)• Define PK and FK constraints against alias tables• Resolve any issues around recursive joins etc

11Thursday, 13 January 2011

Page 12: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Step 2 : Define Outline Business Model

• Define, at a high level, the business model that will represent your data• Aim for single model; in short-term, multiple models may be required‣ Migrate to single model as dimensions become conformed

• Define high level logical tables, starting with logical facts

12Thursday, 13 January 2011

Page 13: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Step 3 : Map Physical Columns into Business Model

• Starting with the logical fact columns, drag and drop physical columns into theoutline logical model, and rename columns to reflect business terms

• Do not drag and drop fact table FK columns across‣ These are referenced through physical model

• Only drag those columns needed for reporting• Define default aggregation for measures

13Thursday, 13 January 2011

Page 14: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Data Federation, and Logical Table Sources

• Data for a logical table can be sourced from >1 data source• Used for combining data from multiple sources at same level of detail‣ “Horizontal Federation”

• Or for combining data sources at differing levels of detail‣ “Vertical Federation”

• Powerful capability of OBIEE, allows you to create a single “virtual” business model that sources data from multiple places, depending on query context

14Thursday, 13 January 2011

Page 15: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Logical Table Source Mappings

• Facts and dimensions are mapped to physical sources Logical Table Sources• LTS are chosen at run time based on RPD

definitions (level mapping, fragmentation, federation etc)

15Thursday, 13 January 2011

Page 16: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Step 4 : Define Logical Dimensions, Levels and Hierarchies

• Define logical dimensions, hierarchies and levels• Ensure logical level keys are unique• Add chronological key(s) for time dimensions‣ Try to define chron. key at each time dim level

• Add level-based measures if required• Important: Enter values for “number of

elements at this level” (used for agg. navigation)

16Thursday, 13 January 2011

Page 17: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Step 5 : Define Calculations

• Define calculations within the business model• Can include regular calculations, analytic function, aggregations, time-series

functions• Uses OBIEE syntax; will either be

function-shipped to database functions, or performed by BI Server

17Thursday, 13 January 2011

Page 18: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Step 6 : Create Subject Areas for each Logical Fact

• Make business area available for reporting through publishing as subject area(s)• Either one subject area per business model, or (better) one per logical fact table‣ In 11gR1, analyses can be written across subject areas

• Also in 11gR1, logical dimensions now appear in subject areas (more on this later)

18Thursday, 13 January 2011

Page 19: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Step 7 : Define Security Policy, Providers and Filters

• Use Security Manager to define (10g) or view (11g) users, application groups/ roles• Apply row-level filters to business model tables and columns• Apply permissions to subject areas, tables and columns• From 11g onwards, best practice is to define LDAP sources through WLS (or

supporting JEE server)

19Thursday, 13 January 2011

Page 20: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

New Features in OBIEE 11gR1 For Data Modeling

• ID Columns for Descriptive Columns (“Double-columns”)• Lookup Tables• Support for Ragged, Skip-Level and Parent-Child Hierarchies• Hierarchical Subject Area Columns• LTS Priority Ordering• Repository Passwords• Deployment of Repository Files using Fusion Middleware Control

20Thursday, 13 January 2011

Page 21: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

ID Columns for Descriptive Columns : Background

• Many dashboards feature dashboard prompts that filter analyses• Usually display prompt values as descriptions• Analyses have IS PROMPTED filters on description columns to respond to

user selections

21Thursday, 13 January 2011

Page 22: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

ID Columns for Descriptive Columns : Background

• The SQL generated will reference the descriptive column in the WHERE clause• May be an issue if partitioning or indexing based on the ID column instead‣ It would be good to be able to substitute an ID for the description column

WITH SAWITH0 AS (select sum(T117.FCAST_SAL_AMT) as c1, T107.PROD_NAME as c2from GCBC_SALES.PRODUCTS T107 /* Dim_PRODUCTS */ , GCBC_SALES.SALES T117 /* Fact_SALES */ where ( T107.PROD_ID = T117.PROD_ID and (T107.PROD_NAME in ('Bowl Bread Club', 'Bread Bowls', 'Breakfast Muffin')) ) group by T107.PROD_NAME)select distinct 0 as c1, D1.c2 as c2, D1.c1 as c3from SAWITH0 D1order by c2

22Thursday, 13 January 2011

Page 23: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

ID Columns for Descriptive Columns (Double-Columns)

• Double-columns in OBIEE 11g are a new RPD feature• Allows you to specify another logical column as the ID column for a descriptor• When the SQL is generated for an analysis, the ID column is used instead

of the descriptor column‣ No changes to analysis required‣ IS PROMPTED filter still on description column‣ Prompt can display IDs as well as description

23Thursday, 13 January 2011

Page 24: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

SQL Generated with Double-Column Setting Enabled

• Display of ID in prompt is optional• Analysis IS PROMPTED filter stays

the same as before, on descriptor• BI Server now uses IDs in SQL instead

WITH SAWITH0 AS (select sum(T117.REV_AMT) as c1, T107.PROD_CAT_DESC as c2, T107.PROD_ID as c3from GCBC_SALES.PRODUCTS T107, GCBC_SALES.SALES T117 where ( T107.PROD_ID = T117.PROD_ID and (T107.PROD_ID in (12, 17, 31)) ) group by T107.PROD_CAT_DESC, T107.PROD_ID),SAWITH1 AS (select 0 as c1, D1.c2 as c2, D1.c3 as c3, D1.c1 as c4, sum(D1.c1) as c5from SAWITH0 D1group by D1.c1, D1.c2, D1.c3)select D1.c1 as c1, D1.c2 as c2, D1.c3 as c3, D1.c4 as c4, sum(D1.c5) over (partition by D1.c2) as c5from SAWITH1 D1

24Thursday, 13 January 2011

Page 25: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Lookup Tables and Function

• LOOKUP function introduced with OBIEE 11g allows lookups on logical and physical tables

• Useful for several scenarios‣ Pushing currency conversions to separate calculations‣ Accessing columns that cannot use GROUP BY (e.g. CLOB)‣ Avoiding unneccesary outer joins in LTS

25Thursday, 13 January 2011

Page 26: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Logical Lookup Tables

• Allows you to define a logical table as being a lookup table‣ Removes check as to whether it is a fact, or joined to a fact table

• Can be accessed via a logical calculation using SPARSE or DENSE lookup• Allows you to model the lookup data within

the business model, ‣ Typically used for lookups held in

different databases to the main data set

26Thursday, 13 January 2011

Page 27: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Lookup Table Use Cases

Physical Logical

Dense Lookup

Sparse Lookup

Financial Restatements where we get the rates for all the countries. In this case, the multiplication of rates will happen after Group By

Same as physical, but supports lookups across data sources (i.e. Oracle and Essbase)

Reporting on datatypes (i.e. CLOBs) that cannot have GROUP BY, DISTINCT applied to them.

Situations where we want to reference a table by an outer join

Same as physical, but supports lookups across data sources (i.e. Oracle and Essbase)

27Thursday, 13 January 2011

Page 28: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Accessing Lookup Tables

• Lookup tables are accessed using the new LOOKUP function• Can be SPARSE (outer join) or DENSE (inner join)• Either pushed to two queries or combined into single, depending on data source

Lookup(DENSE <<lookupColumn>>, <<sourceKeyorExpression>>) Lookup(SPARSE <<lookupColumn>>, <<alternateColumn>>, <<sourceKeyorExpression>>)

28Thursday, 13 January 2011

Page 29: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Lookup Table/Function Use Case : Currency Conversion

• Scenario : Mail-order sales in GBP need to be converted to USD for reporting‣ Usual approach is to join fact table LTS to exchange rates table, then multiply

GBP rate with exchange rate‣ Includes rate table in join‣ Can be expensive as rates don’t vary by

product, geography etcWITH SAWITH0 AS (select distinct T1114.EXCH_RATE as c1, T1128.PROD_CAT_DESC as c2, T1173.MONTH_YYYYMM as c3from GCBC_SALES.TIMES T1173, GCBC_SALES.PRODUCTS T1128, GCBC_MAILORDER_SALES.EXCHANGE_RATES T1114, GCBC_MAILORDER_SALES.UK_MAILORDER_SALES T1120where ( T1114.MONTH_YYYYMM = T1120.MONTH_YYYYMM ...

29Thursday, 13 January 2011

Page 30: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Lookup Table/Function Use Case : Currency Conversion

• Solution : Access exchange rates table via lookup table and lookup function‣ Moves currency conversion calculation out of main join/GROUP BY‣ Potentially less expensive than including conversion in main join‣ Creates two logical SQLs, may be pushed into single SQL using WITH clause

WITH SAWITH0 AS (select sum(T1120.LOC_REV_AMT) as c1, T1128.PROD_CAT_DESC as c2, T1173.MONTH_YYYYMM as c3from GCBC_SALES.TIMES T1173, GCBC_SALES.PRODUCTS T1128, GCBC_MAILORDER_SALES.UK_MAILORDER_SALES T1120where ( T1120.MONTH_YYYYMM = T1173.MONTH_YYYYMM and T1120.PROD_ID = T1128.PROD_ID ) group by T1128.PROD_CAT_DESC, T1173.MONTH_YYYYMM),...SAWITH2 AS (select T1114.EXCH_RATE as c1, T1114.MONTH_YYYYMM as c2from GCBC_MAILORDER_SALES.EXCHANGE_RATES T1114),

30Thursday, 13 January 2011

Page 31: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Ragged and Skip-Level Logical Dimensions

• Level-based hierarchies may have skip-levels, or ragged hierarchies• Skip-levels are when members may not have an immediate parent• Ragged hierarchies are when leaf members are not all at the same level

Ragged Member

31Thursday, 13 January 2011

Page 32: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Ragged and Skip-Level Logical Dimensions

• Level-based hierarchies may have skip-levels, or ragged hierarchies• Skip-levels are when members may not have an immediate parent• Ragged hierarchies are when leaf members are not all at the same level

Ragged Member Skipped Level

31Thursday, 13 January 2011

Page 33: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Ragged and Skip-Level Logical Dimensions in the Dataset

• Skip-levels and Ragged hierarchies are represented in the underlying tablethrough NULLs

All Stores

Region

Store

Concession

32Thursday, 13 January 2011

Page 34: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Creating Ragged and Skip-Level Logical Dimensions

• Select Ragged and/or Skip-Level in the logical dimension properties‣ Do not select for non-ragged, non-skip, as detecting NULLs adds overhead

• For ragged hierarchies, add surrogate key to ensure consistent logical PK‣ Delete this additional level when you create the presentation hierarchy

33Thursday, 13 January 2011

Page 35: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Querying Ragged and Skip-Level Dimensions

• Dimensions can now be published to the Presentation Layer • Can then be queried directly in Answers for enhanced OLAP-style analysis• Referred to as a Hierarchical Column• 10g-style columns now referred to

as Attribute and Measure Columns

34Thursday, 13 January 2011

Page 36: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

SQL Generated By Hierarchical Columns

• For level-based hierarchies, one subquery is generated for each “indentation” in the hierarchical column, to totals for levels

• For simple queries (few drills, balanced-hierarchy), aggregation is likely be performed using GROUP BYs

• These totals are then UNION ALLed with separate logical SQL queriesto retrieve indented member names

WITH Subquery to retrieve amounts GROUP BY “All Product” Subquery to retrieve amounts GROUP BY “Product Categories” Subquery to retrieve amounts GROUP BY “Product Types”UNION ALL Retrieve list of All ProductsUNION ALL Retrieve list of Product Categories for all selected membersUNION ALL Retreive list of all Product Types for selected members

35Thursday, 13 January 2011

Page 37: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Hierarchical Column Performance Considerations

• SQL generated for balanced hierarchical columns can get very complex and long• A single SQL statement should get generated (Oracle 10gR2+) using UNION ALL

and subquery factoring (WITH clause), but SQL can get big• Effect is worse for Essbase sources as logical MDX queries cannot be combined,

resulting in multiple MDX queries being generated for a single pivot view

= 523 lines of SQL

36Thursday, 13 January 2011

Page 38: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Special Considerations for Ragged/Skip Level Hierarchies

• Because the BI Server needs to “peek” at lower levels with ragged/skip-levelhierarchies, it needs to collect more aggregations in than the user requested‣ In case there is a skip-level member

that also needs displaying‣ In case the member is ragged and

we need to disable further drill-down

Skip-Level Concession Member,also needs to be displayedwhen drilled-down to Store level

Ragged store members, need to have drill-down (“+”) link disabledas they have no concessions

37Thursday, 13 January 2011

Page 39: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

SQL Generated by Ragged/Skip-Level Hierarchies

• Analyses using Ragged and/or Skip-Level Hierarchies are more likely to useGROUP BY GROUPING SETS, and GROUPING ID clauses‣ Balanced hierarchies also can use this, but usually only for more complex

queries and extensive drilling; for ragged/skip level, almost always used• Produces a GROUP BY for all levels in the hierarchy, plus vector (GROUPING ID)

to enable BI Server to retrieve required aggregations• Powerful feature, but can have performance overhead (more work for database)

WITH Subquery to retrieve MAX level members Subquery to retrieve amounts + GROUPING ID GROUP BY GROUPING SETSUNION ALL Retrieve list of All StoresUNION ALL Retrieve list of Regions for all selected membersUNION ALL Retreive list of all Stores for selected membersUNION ALL Retreive list of Concessions for selected members

38Thursday, 13 January 2011

Page 40: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Parent-Child (Value-Based) Dimensions

• Some data sets contain recursive, parent-child (value-based) hierarchies‣ Hierarchy is defined in the data, rather than the column relationships

• Typically used for organizations and other implicitely ragged hierarchies

• Difficult to model relationally as recursiveSQL queries would be required to traverse

39Thursday, 13 January 2011

Page 41: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Creating Parent-Child Hierarchies

• Command to create logical dimensions now includes Parent-Child option• Initial logical dimension dialog then prompts you to select Parent Column• Once selected, you then need to define the closure table to resolve recursion

40Thursday, 13 January 2011

Page 42: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Parent-Child Hierarchy Closure Tables

• To avoid the need for recursive SQL, a closure table is defined for the hierarchy• Iterates through the hierarchy once, speeds up all subsequently queries• Creates two scripts; one to create closure table, one to populate it• Population script will need to be re-run each time underlying data changes

41Thursday, 13 January 2011

Page 43: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Member IDs and Descriptions

• You would normally use IDs as the member and parent keys‣ Ensures uniqueness (names may contain duplicates)

• However by default, this would lead to IDs being displayed in the hierarchy• To ensure descriptions are used, the display column feature in the

presentation hierarchy should be used

42Thursday, 13 January 2011

Page 44: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Querying Parent-Child Hierarchical Columns

• Parent-child hierarchies are queried in the same was as level-based ones,through hierarchical columns‣ But by default, measures are treated as

attributes for the dimension member‣ Therefore amounts are not

aggregated up the hierarchy‣ Why is this?

43Thursday, 13 January 2011

Page 45: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Default Physical Joins Between Fact, Dim and Closure Tables

• By default, the Parent-Child Closure Table wizard only sets up the dimension,not the link between the dimension and the fact table

• So there is no join set up between the fact/dimension tables, and the closure table, and therefore there is no way for the BI Server to know who the eachparent member’s descends are (and therefore roll-up the amounts)

44Thursday, 13 January 2011

Page 46: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Enabling Aggregation for Parent-Child Hierarchies : Step 1

• To enable roll-up of amounts for members, additional joins have to createdand existing ones removed in the physical layer1. Break join between Fact table and Parent-Child dimension table2. Create join on closure table MEMBER KEY to fact table dimension key3. Create join on dimension table key to closure table ANCESTOR KEY

45Thursday, 13 January 2011

Page 47: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Enabling Aggregation for Parent-Child Hierarchies : Step 2

• Then, include the closure table in the dimension logical table LTS mapping• Fact table will now be joined through the closure table to the dimension table,

providing the join required to aggregate up the parent-child hierarchy• Other aggregation methods are also possible with parent-child hierarchies‣ See http://www.rittmanmead.com/2010/11/23/oracle-bi-ee-11g-parent-child-hierarchies-multiple-modeling-methods/

46Thursday, 13 January 2011

Page 48: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Parent-Child vs. Ragged Hierarchies : Which to Use?

• Parent-child hierarchies are naturally ragged, so which should you choose?• Depends on the data structures you are reporting on‣ If each hierarchy level is distinct and named, go for level-based with ragged

hierarchy option‣ If hierarchy levels are not named, or data is stored in RDBMS recursively,

go for parent-child hierarchy• Parent-child takes more maintenance, so only use if neccessary

vs.

47Thursday, 13 January 2011

Page 49: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Hierarchical Columns and Essbase Sources

• Essbase data sources can be amended to use parent-child (“value”) hierarchies• Avoids issue where changing outlines requires re-import• Business Model columns no longer based

on outline generations• New generations can be added dynamically

as Essbase outline evolves

48Thursday, 13 January 2011

Page 50: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

LTS Priority Group Order

• A single logical table can have multiple logical table sources defined• Usually, the selection of LTS by the BI Server is straightforward and

defined by the context of the query• When multiple aggregate LTS are defined,

however, which one is chosen can be difficult to determine (based on Number of Members At This Level)

• OBIEE 11gR1 LTS Priority Group Order makes this more explicit‣ Lower value = higher priority‣ LTS Priority Group becomes

main decider in which LTS to use

49Thursday, 13 January 2011

Page 51: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

LTS Priority Group Example

• A logical fact table has two LTS mapped; one detail-level and one aggregate• By default, the aggregate source is used for aggregated queries (due to

dimension logical level mapping)• This behaviour will be over-ridden though when LTS Priority Group is amended‣ Setting it to 1 makes it lower priority than the detail-level LTS

select sum(T879.FCAST_SAL_AMT) as c1, T873.PROD_CAT_DESC as c2from GCBC_AGGS.A_PROD_CATEGORIES T873 GCBC_AGGS.A_SALES_AGG T879 where ( T873.PROD_CAT_DESC = T879.PROD_CAT_DESC ) group by T873.PROD_CAT_DESC

select sum(T117.FCAST_SAL_AMT) as c1, T107.PROD_CAT_DESC as c2from GCBC_SALES.PRODUCTS T107 , GCBC_SALES.SALES T117 where ( T107.PROD_ID = T117.PROD_ID ) group by T107.PROD_CAT_DESC

50Thursday, 13 January 2011

Page 52: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Repository Passwords, and Repository Identity Management

• Repository files now have a password‣ Secures RPD file when there is no access to WebLogic Server

• RPD files are now encrypted, and compressed• RPD Password is all that is required to edit RPD offline;

BIAdministrator application role required in addition to edit online

51Thursday, 13 January 2011

Page 53: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Deployment of RPD Files Through Enterprise Manager

• Repository files are now deployed using Fusion Middleware Control• Select Deployment > Repository > Lock and Edit Configuration• Select RPD file and enter repository password• Press Apply > Activate Changes > Restart to Apply Changes

52Thursday, 13 January 2011

Page 54: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Summary

• The goal of the semantic model is to simplify reporting data using a conformed logical dimensional model

• New features included with OBIEE 11g for repository design include:‣ Double-columns (IDs for descriptive columns) - useful for indexing and

partitioning, no impact on web catalog objects‣ Lookup tables and functions - for logically-separating elements of queries, and

for handling datatypes that cannot be GROUPed BY / outer join issues‣ Ragged, Skip-Level and Parent-Child hierarchies (though watch for more

complex SQL and aggregation issues)• Management now through Fusion Middleware Control• For more information, check out our website‣ http://www.rittmanmead.com/blog‣ http://www.rittmanmead.com/articles‣ http://www.rittmanmead.com/events

53Thursday, 13 January 2011

Page 55: Odtug Rittman Webcast Rpd11g

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : [email protected] W: www.rittmanmead.com

Mark Rittman, Director, Rittman MeadFor Oracle Development Tools User Group, December 2010

New RPD Modeling Features in OBIEE 11g

54Thursday, 13 January 2011