418
Oracle BI Suite EE 10g R3: Build Repositories Volume 1 - Student Guide D53149GC11 Edition 1.1 March 2008 D54268 ® Oracle Internal & Oracle Academy Use Only

Student Guide OBIEE 1

Embed Size (px)

Citation preview

Page 1: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories

Volume 1 - Student Guide

D53149GC11

Edition 1.1

March 2008

D54268

®

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 2: Student Guide OBIEE 1

AuthorJim Sarokin

Technical Contributors and Reviewers

Matt Bedin

Dan Hilldale

Gerry Langton

Sharonda Pettiett

Phillip Scott

Kasturi Shekhar

Krishnan Viswanathan

Kurt Wolff

EditorsAmitha NarayanRichard WallisRaj Kumar

Graphic DesignerSamir Mozumdar

PublishersMichael Sebastian AlmeidaVeena Narasimhan

Copyright © 2008, Oracle. All rights reserved.

Disclaimer

This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way. Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle.

The information contained in this document is subject to change without notice. If you find any problems in the document, please report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not warranted to be error-free.

Restricted Rights Notice

If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United States Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTSThe U.S. Government’s rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract.

Trademark Notice

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 3: Student Guide OBIEE 1

iii

Contents I Course Introduction

Lesson Agenda I-2 Instructor and Class Participants I-3 Training Site Information I-4 Course Audience I-5 Course Prerequisites I-6 Course Goal I-7 Course Objectives I-8 Course Methodology I-12 Course Materials I-13 Course Agenda I-14 Summary I-19

1 Repository Basics

Objectives 1-2 Oracle BI Architecture Components 1-3 Clients 1-4 Oracle BI Presentation Services 1-5 Oracle BI Server 1-6 Oracle BI Repository 1-7 Data Sources 1-8 Sample Request Processing 1-9 Oracle BI Administration Tool 1-10 Physical Layer 1-11 Physical Layer Objects 1-12 Business Model and Mapping Layer 1-13 Business Model and Mapping Layer Objects 1-14 Business Model Mappings 1-15 Measures 1-16 Presentation Layer 1-17 Presentation Layer Mappings 1-18 Presentation Layer Defines User Interface 1-19 Repository Directory 1-20 Repository Modes 1-21 Adding an Entry in NQSConfig.ini 1-22

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 4: Student Guide OBIEE 1

iv

Reloading Server Metadata 1-23 Summary 1-24 Practice 1-1 Overview: Exploring an Oracle BI Repository 1-25

2 Building the Physical Layer of a Repository

Objectives 2-2 Physical Layer 2-3 Physical Layer Objects 2-4 Database Object 2-5 Database Object: General Properties 2-6 Database Object: Features 2-7 Connection Pool 2-9 Schema Folder 2-10 Physical Table 2-11 Physical Table Properties 2-12 Physical Table: Alias 2-13 Physical Table: Select Table Type 2-14 Physical Table: View Deployment 2-15 Physical Column 2-16 Key Column 2-17 Joins 2-18 ABC Scenario 2-19 Implementation Steps 2-20 1. Import the Physical Schema 2-21 2. Select Tables and Columns for Import 2-22 3. Import Keys and Joins 2-23 4. Check the Import 2-24 5. Edit Connection Pool Properties 2-25 6. Define Physical Keys and Joins 2-26 Defining Keys Using the Table Properties Dialog Box 2-27 Using the Physical Diagram 2-28 Defining Foreign Key Joins 2-29 Summary 2-30 Practice 2-1 Overview: ABC Business Scenario 2-31 Practice 2-2 Overview: Gathering Information to Build an Initial Business Model 2-32 Practice 2-3 Overview: Creating a Repository and Importing a Data Source 2-33 Practice 2-4 Overview: Defining Keys and Joins 2-34 Practice 2-5 Overview: Creating Alias and Select Tables 2-35

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 5: Student Guide OBIEE 1

v

3 Building the Business Model and Mapping Layer of a Repository Objectives 3-2 Business Model and Mapping (BMM) Layer 3-3 Business Model and Mapping Layer Objects 3-4 Business Model Mappings 3-5 Business Model and Mapping Layer Objects 3-6 Business Model 3-7 Logical Tables 3-8 Logical Table Sources 3-9 Logical Table Source: Column Mappings 3-10 Logical Columns 3-11 Logical Primary Keys 3-12 Logical Joins 3-13 Logical Complex Join 3-14 Measures 3-15 ABC Example 3-16 Implementation Steps 3-17 1. Create the Logical Business Model 3-18 2. Create the Logical Tables and Columns 3-19 3. Define the Logical Joins 3-20 4. Modify the Logical Tables and Columns 3-21 5. Define the Measures 3-22 Best Practices 3-23 Summary 3-24 Practice 3-1 Overview: Creating the Business Model 3-25 Practice 3-2 Overview: Creating Simple Measures 3-26

4 Building the Presentation Layer of a Repository

Objectives 4-2 Presentation Layer 4-3 Presentation Catalogs 4-4 Presentation Tables 4-5 Presentation Columns 4-6 Presentation Layer Mappings 4-7 Defining User Interface in the Presentation Layer 4-8 Nested Presentation Tables 4-9 Aliases 4-10 ABC Example 4-11 Implementation Steps 4-12 1. Create a New Presentation Catalog 4-13 2. Rename Tables 4-14

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 6: Student Guide OBIEE 1

vi

3. Reorder Tables 4-15 4. Delete Columns 4-16 5. Rename Columns 4-17 6. Reorder Columns 4-18 Considerations 4-19 Best Practices 4-20 Summary 4-21 Practice 4-1 Overview: Creating the Presentation Layer 4-22

5 Testing and Validating a Repository

Objectives 5-2 Validating a Repository 5-3 ABC Example 5-4 Consistency Check 5-5 Checking Consistency 5-6 Consistency Check Manager 5-7 Disabling Consistency Check Messages 5-8 Enabling Logging 5-9 Setting a Logging Level 5-10 Logging Levels 5-11 Adding a Repository Entry to an Initialization File 5-12 Loading the Repository 5-13 Validating by Using Oracle BI Answers 5-14 Inspecting the Query Log 5-15 Oracle BI SELECT Statement Syntax 5-16 Oracle BI SELECT Statement Compared with Standard SQL 5-17 Summary 5-18 Practice 5-1 Overview: Testing the Repository 5-19 Practice 5-2 Overview: Checking Consistency 5-20

6 Adding Multiple Logical Table Sources

Objectives 6-2 Table Structures 6-3 Business Challenge 6-4 Business Solution 6-5 ABC Example: Adding Multiple Sources to a Logical Table Source (LTS) 6-6 Implementation Steps: Adding Multiple Sources to an LTS 6-7 1. Import Additional Product Tables 6-8 2. Define Keys and Joins 6-9 3. Identify Physical Columns for Mappings 6-10 4. Adding Sources to an LTS 6-11

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 7: Student Guide OBIEE 1

vii

4a. Manual: Create New Logical Column 6-12 4a. Manual: Add New Physical Source 6-13 4a. Manual: Create Column Mapping 6-14 4a. Manual: End Result 6-15 4b. Drag Method 6-16 4b. Drag Method: Logical Columns Added 6-17 4b. Drag Method: Physical Tables Added 6-18 4b. Drag Method: Column Mappings Added 6-19 5. Rename Logical Columns 6-20 6. Add Columns to the Presentation Layer 6-21 ABC Example: Adding a New Logical Table Source 6-22 Implementation Steps: Adding a New Logical Table Source 6-23 1. Examine Existing Column Mappings 6-24 2. Identify a Single Table That Stores Both Columns 6-25 3. Add a New Logical Table Source 6-26 4. Define the Content of the Logical Table Source 6-27 Summary 6-28 Practice 6-1 Overview: Enhancing the Product Dimension 6-29 Practice 6-2 Overview: Creating Multiple Sources for a Logical Table Source (Manual) 6-30 Practice 6-3 Overview: Creating Multiple Sources for a Logical Table Source (Automated) 6-31 Practice 6-4 Overview: Adding a New Logical Table Source 6-32

7 Adding Calculations to a Fact

Objectives 7-2 Business Problem 7-3 Business Solution 7-4 ABC Example 7-5 Implementation Methods 7-6 Steps for Using Existing Logical Columns 7-7 1. Create a New Logical Column 7-8 2. Specify Logical Columns as the Source 7-9 3. Build a Formula 7-10 Steps for Using Physical Columns 7-11 1. Create a New Logical Column 7-12 2. Map the New Column 7-13 3. Build the Formula 7-14 4. Specify an Aggregation Rule 7-15 Steps for Using the Calculation Wizard 7-16 1. Open the Calculation Wizard 7-17

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 8: Student Guide OBIEE 1

viii

2. Choose the Columns for Comparison 7-18 3. Select the Calculations 7-19 4. Confirm the Calculation Measures 7-20 5. New Calculation Measures Are Added 7-21 Add New Measures to the Presentation Layer 7-22 Examining a Query Using Physical Columns 7-23 Example: Using Physical Columns 7-24 Examining a Query Using Logical Columns 7-25 Example: Using Logical Columns 7-26 Examining a Query Using the Calculation Wizard 7-27 Summary 7-28 Practice 7-1 Overview: Creating Calculation Measures by Using Logical Columns 7-29 Practice 7-2 Overview: Creating Calculation Measures by Using Physical Columns 7-30 Practice 7-3 Overview: Creating Calculation Measures by Using the Calculation Wizard 7-31

8 Creating Dimension Hierarchies and Level-Based Measures

Objectives 8-2 Dimension Hierarchies 8-3 Level-Based Measures 8-4 Share Measures 8-5 Dimension Hierarchy: Example 8-6 ABC Example 8-7 Steps to Create a Dimension Hierarchy 8-8 1. Create a Dimension Object 8-9 2. Add a Parent-Level Object 8-10 3. Add Child-Level Objects 8-11 4. Determine the Number of Elements 8-12 5. Specify Level Columns 8-13 6. Create Level Keys 8-14 7. Set the Preferred Drill Path 8-15 8. Create Level-Based Measures 8-16 9. Create Additional Level-Based Measures 8-17 10. Create Share Measures 8-18 11. Create Rank Measures 8-19 12. Add Measures to the Presentation Layer 8-20 13. Test Share and Rank Measures 8-21 Summary 8-22 Practice 8-1 Overview: Creating Dimension Hierarchies 8-23

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 9: Student Guide OBIEE 1

ix

Practice 8-2 Overview: Creating Level-Based Measures 8-24 Practice 8-3 Overview: Creating Share and Rank Measures 8-25 Practice 8-4 Overview: Creating Dimension-Specific Aggregation Rules 8-26

9 Using Aggregates

Objectives 9-2 Business Challenge 9-3 Business Solution: Aggregate Tables 9-4 Oracle BI Aggregate Navigation 9-5 Aggregated Facts 9-6 Modeling Aggregates 9-7 ABC Example 9-8 Steps to Implement Aggregate Navigation 9-9 1. Import Tables 9-10 2. Create Joins 9-11 3. Create Fact Logical Table Source and Mappings 9-12 4. Specify Fact Aggregation Content 9-13 5. Specify Content for the Fact Detail Source 9-14 6. Create Dimension Logical Table Source and Mappings 9-15 7. Specify Dimension Aggregation Content 9-16 8. Specify Content for the Dimension Detail Source 9-17 9. Test Results for Levels Stored in Aggregates 9-18 10. Test Results for Data Above or Below Levels 9-19 Aggregate Persistence Wizard 9-20 Aggregate Persistence Wizard Steps 9-21 1. Open Aggregate Persistence Wizard 9-22 2. Specify File Name and Location 9-23 3. Select Business Model and Measures 9-24 4. Select Dimensions and Levels 9-25 5. Select Connection Pool, Container, and Name 9-26 6. Review Aggregate Definition 9-27 7. View Complete Aggregate Script 9-28 8. Verify that the Script Is Created 9-29 9. Create and Run a Batch File 9-30 10. Verify Aggregates in the Physical Layer 9-31 11. Verify Aggregates in the BMM Layer 9-32 12. Verify Aggregates in the Database 9-33 13. Verify Results in Answers 9-34 Troubleshooting Aggregate Navigation 9-35 Considerations 9-36 Summary 9-37

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 10: Student Guide OBIEE 1

x

Practice 9-1 Overview: Using Aggregate Tables 9-38 Practice 9-2 Overview: Using the Aggregate Persistence Wizard 9-39

10 Using Partitions and Fragments

Objectives 10-2 Business Challenge 10-3 Business Solution: Oracle BI Server 10-4 Partition 10-5 Partitioning by Fact 10-6 Partitioning by Value 10-7 Partitioning by Level 10-8 Complex Partitioning 10-9 ABC Example: Value-Based (Customer) 10-10 ABC Example: Fact-Based (Quota) 10-11 ABC Example: Value-Based (Inventory) 10-12 Implementation Steps 10-13 Specify Fragmentation Content 10-14 Summary 10-15 Practice 10-1 Overview: Modeling a Value-Based Partition 10-16 Practice 10-2 Overview: Modeling a Fact-Based Partition 10-17 Practice 10-3 Overview: Using the Calculation Wizard to Create Derived Measures 10-18 Practice 10-4 Overview: Modeling Fragmented Inventory Data 10-19

11 Using Repository Variables

Objectives 11-2 Variables 11-3 Variable Manager 11-4 Variable Types 11-5 Repository Variables 11-6 Static Repository Variables 11-7 Dynamic Repository Variables 11-8 Session Variables 11-9 System Session Variables 11-10 Non-System Session Variables 11-11 Initialization Blocks 11-12 Initialization Block: Example 11-13 Initialization Block Example: Edit Data Source 11-14 Initialization Block Example: Edit Data Target 11-15 ABC Example 11-16 Implementation Steps 11-17

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 11: Student Guide OBIEE 1

xi

1. Open the Variable Manager 11-18 2. Create an Initialization Block 11-19 3. Edit the Data Source 11-20 4. Edit the Data Target 11-21 5. Test the Initialization Block Query 11-22 6. Use the Variable to Determine Content 11-23 7. Verify the Initialization 11-24 Summary 11-25 Practice 11-1 Overview: Creating Dynamic Repository Variables 11-26 Practice 11-2 Overview: Using Dynamic Repository Variables as Filters 11-27

12 Modeling Time Series Data

Objectives 12-2 Time Comparisons 12-3 Business Challenge: Time Comparisons 12-4 Oracle BI Solution: Model Time Comparisons 12-5 Oracle BI Solution: Time Series Functions 12-6 ABC Example 12-7 Steps to Model Time Series Data 12-8 1. Identify Time Dimension and Chronological Keys 12-9 2. Create the Ago Measure 12-10 3. Use Existing Columns to Create Additional Ago Measures 12-11 4. Create the ToDate Measure 12-12 5. Add New Measures to the Presentation Layer 12-13 6. Test the Results in Answers 12-14 Summary 12-15 Practice 12-1 Overview: Creating Time Series Comparison Measures 12-16

13 Modeling Many-to-Many Relationships

Objective 13-2 Business Challenge and Solution 13-3 Bridge Table 13-4 ABC Example 13-5 Steps to Model a Bridge Table 13-6 1. Import Tables 13-7 2. Create the Physical Model 13-8 3. Create the Logical Model 13-9 4. Map the Bridge Table 13-10 5. Create a Calculation Measure 13-11 6. Map Objects to the Presentation Layer 13-12 7. Verify the Results 13-13

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 12: Student Guide OBIEE 1

xii

Helper Tables 13-14 Position Hierarchy: Example 13-15 Position Dimension Table 13-16 Position ID 13-17 Sub-Position ID 13-18 Position Hierarchy Gap 13-19 Position Helper Table 13-20 Using Helper Table to Model Many-to-Many Relationships 13-21 Manager Alias 13-22 ABC Example 13-23 Steps to Model a Helper Table 13-24 1. Create Helper Table 13-25 2. Build Physical Model 13-26 3. Build Logical Model 13-27 4. Map Logical Table Source 13-28 5. Build the Presentation Layer 13-29 6. Verify the Results 13-30 Summary 13-31 Practice 13-1 Overview: Modeling a Bridge Table 13-32 Practice 13-2 Overview: Modeling a Helper Table 13-33

14 Localizing Oracle BI Metadata

Objective 14-2 Business Challenges and Solution 14-3 Oracle BI Multilingual Support 14-4 Configuring Oracle BI Metadata 14-5 WEBLANGUAGE Session Variable 14-6 LOCALE Session Variable 14-7 Changing Localization Preferences 14-8 ABC Example 14-9 Steps to Localize Metadata 14-10 1. Externalize Metadata Objects 14-11 2. Run the Externalize Strings Utility 14-12 3. Create a Translation Table 14-13 4. Import the Translation Table 14-14 5. Create an Initialization Block 14-15 6. Modify My Account Preferences 14-16 7. Verify the Translations 14-17 Summary 14-18 Practice 14-1 Overview: Localizing Repository Metadata 14-19

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 13: Student Guide OBIEE 1

xiii

15 Localizing Oracle BI Data Objective 15-2 Business Challenges and Solution 15-3 Oracle BI Multilingual Support 15-4 Required Translation Tables 15-5 ABC Example 15-6 Steps for Localizing Data 15-7 1. Create a Language Translation Table 15-8 2. Create an Available Language Table 15-9 3. Import Tables to the Physical Layer 15-10 4. Create a Session Variable Initialization Block 15-11 5. Create a Language Translation Table Alias 15-12 6. Create Physical Joins 15-13 7. Map the Logical Table Source 15-14 8. Create Column Mapping 15-15 9. Apply a WHERE Filter 15-16 10. Verify the Results 15-17 Summary 15-18 Practice 15-1 Overview: Localizing Oracle BI Data 15-19

16 Setting an Implicit Fact Column Objectives 16-2 Business Challenge: Dimension-Only Queries 16-3 Business Solution: Implicit Fact Column 16-4 ABC Example 16-5 Steps to Configure an Implicit Fact Column 16-6 1. Set an Implicit Fact Column 16-7 2. Verify the Results 16-8 3. Clear the Implicit Fact Column 16-9 Summary 16-10 Practice 16-1 Overview: Setting an Implicit Fact Column 16-11

17 Integrating Third-Party Reporting Tools Objectives 17-2 Business Challenge 17-3 Business Solution 17-4 Third-Party Reporting Architecture 17-5 ABC Example 17-6 Steps for Third-Party Reporting Tool Integration 17-7 1. Identify the Presentation Catalog 17-8 2. Export Logical Keys 17-9

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 14: Student Guide OBIEE 1

xiv

3. Configure the ODBC Connection 17-10 4. Configure the Third-Party Reporting Tool 17-12 5. Verify the Results 17-13 Summary 17-14 Practice 17-1 Overview: Integrating a Third-Party Reporting Tool 17-15

18 Creating Repositories from Multidimensional Data Sources

Objective 18-2 Overview 18-3 XML for Analysis (XMLA) 18-4 Multidimensional Versus Relational Data Sources 18-5 Overview: Importing Multidimensional Data Sources 18-6 Considerations: Importing Multidimensional Data Sources 18-7 ABC Example 18-8 Creating a Multidimensional Business Model 18-9 1. Import a Physical Schema 18-10 2. Set Up the Connection Pool 18-11 3. Verify the Import 18-12 4. Verify Imported Hierarchies and Levels 18-13 5. Verify Imported Measures 18-14 6. Work with Preaggregated Measures 18-15 7. Update Member Counts 18-16 8. View Members 18-17 9. Add a Hierarchy 18-18 9a. Create a Hierarchy Object 18-19 9b. Add Levels and Columns 18-20 9c. Modify the Hierarchy 18-21 10. Create the Business Model and Mapping Layer 18-22 11. Create the Presentation Layer 18-23 12. Verify the Results 18-24 Summary 18-25 Practice 18-1: Creating a Repository Using a Multidimensional Data Source 18-26

19 Security

Objectives 19-2 Business Challenge 19-3 Business Solution: Oracle BI Security 19-4 Security Manager 19-5 Working with Users 19-6 Adding a User to a Repository 19-7 Setting User Permissions and Logons 19-8

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 15: Student Guide OBIEE 1

xv

Administrator Account 19-9 Working with Groups 19-10 Administrators Group 19-11 Defined Groups 19-12 Group Inheritance 19-13 Group Inheritance: Example 19-14 Adding a New Group 19-15 Viewing Member Hierarchies 19-16 Authentication 19-17 Authentication Options 19-18 Operating System Authentication 19-19 External Table Authentication 19-20 LDAP Authentication 19-21 Database Authentication 19-22 Internal Authentication 19-23 Order of Authentication 19-24 Bypassing Oracle BI Security 19-25 Setting Query Limits 19-26 Setting Timing Restrictions 19-27 Setting Filters 19-28 Summary 19-29 Practice 19-1 Overview: Creating Users and Groups 19-30 Practice 19-2 Overview: Setting Permissions for Users and Groups 19-31 Practice 19-3 Overview: Authenticating Using an External Database 19-32 Practice 19-4 Overview: Authenticating Users with Database Authentication 19-33 Practice 19-5 Overview: Setting Query Limits and Timing Restrictions 19-34 Practice 19-6 Overview: Setting Filters to Personalize Information 19-35

20 Cache Management

Objective 20-2 Business Challenge 20-3 Business Solution: Oracle BI Server Query Cache 20-4 Advantages of Caching 20-5 Costs of Caching 20-6 Oracle BI Query Cache Architecture 20-7 Configuring Query Cache 20-8 Monitoring and Managing the Cache 20-9 Cache Management Techniques 20-10 Configuring the Cache Parameters 20-11 Setting Caching and Cache Persistence for Tables 20-12 Using the Cache Manager 20-13

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 16: Student Guide OBIEE 1

xvi

Inspecting SQL for Cache Entries 20-14 Modifying the Cache Manager Column Display 20-15 Inspecting Cache Reports 20-16 Purging Cache Entries Manually Using the Cache Manager 20-17 Purging Cache Entries Automatically 20-18 Using Event Polling Tables 20-19 Seeding the Cache 20-20 Cache Hit Conditions 20-21 Summary 20-22 Practice 20-1 Overview: Inspecting the Cache Files 20-23 Practice 20-2 Overview: Modifying Cache Parameters 20-24 Practice 20-3 Overview: Seeding the Cache 20-25

21 Enabling Usage Tracking

Objectives 21-2 Business Challenges 21-3 Business Solution: Oracle BI Usage Tracking 21-4 Oracle BI Usage Tracking Methods 21-5 ABC Example 21-6 Steps to Enable Usage Tracking 21-7 1. Create the Usage Tracking Table 21-8 2. Import the Table 21-9 3. Build a Business Model 21-10 4. Enable Usage Tracking 21-11 5. Enable Direct Insertion 21-12 6. Set the Physical Table Parameter 21-13 7. Set the Connection Pool Parameter 21-14 8. Set Additional Parameters 21-15 9. Test the Results 21-16 Analyzing Usage Tracking Data 21-17 Usage Tracking Sample 21-18 Summary 21-19 Practice 21-1 Overview: Enabling Usage Tracking 21-20

22 Multi-User Development

Objectives 22-2 Business Challenge 22-3 Business Solution: Oracle BI MUDE 22-4 Oracle BI Repository Development Process 22-5 SCM Three-Way Merge 22-6 Oracle BI Repository Three-Way Merge 22-7

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 17: Student Guide OBIEE 1

xvii

Multi-User Development Projects 22-8 Overview: Oracle BI Multi-User Development 22-9 ABC Example 22-10 Steps to Set Up an Oracle BI MUDE 22-11 1. Create Projects 22-12 2. Edit Projects 22-13 3. Set Up a Shared Network Directory 22-14 4. Copy the Master Repository to the Shared Directory 22-15 Making Changes in an Oracle BI MUDE 22-16 1. Point to the Multi-User Directory 22-17 2. Check Out Projects 22-18 3. Administration Tool Tasks During Checkout 22-19 4. Change Metadata 22-20 5. Multi-User Options During Development 22-21 6. Administration Tool Tasks During Checkin 22-22 7. Checkin Changes: Lock Information Dialog Box 22-23 8. Checkin Changes: “Merge repositories” Dialog Box 22-24 9. Closing a Repository Before Publishing to Network 22-25 10. Publish to Network 22-26 11. Merge Decisions 22-27 12. Track Project History 22-28 History Menu Options 22-29 Deleting History Items 22-30 Summary 22-31 Practice 22-1 Overview: Setting Up a Multi-User Development Environment 22-32 Practice 22-2 Overview: Using a Multi-User Development Environment 22-33

23 Using Administration Tool Utilities

Objectives 23-2 Wizards and Utilities 23-3 Accessing Wizards and Utilities 23-4 Managing Joins 23-5 Managing Sessions 23-6 Querying Repository Metadata 23-7 Replacing Columns or Tables 23-8 Externalizing Strings 23-9 Renaming Repository Objects 23-10 Documenting a Repository 23-11 Generating a Metadata Dictionary 23-12 Creating an Event Table 23-13 Updating the Physical Layer 23-14

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 18: Student Guide OBIEE 1

xviii

Removing Unused Physical Objects 23-15 Summary 23-16 Practice 23-1 Overview: Exploring Administration Tool Features 23-17

24 Optimizing Query Performance

Objective 24-2 Business Challenge 24-3 Business Solution 24-4 Oracle BI Features That Optimize Performance 24-6 Optimizing Query Performance 24-7 Using Aggregates 24-8 Using Aggregate Navigation 24-9 Constraining Results Using a WHERE Clause 24-10 Caching 24-11 Limiting the Number of Initialization Blocks 24-12 Limiting Select Table Types 24-13 Modeling Dimension Hierarchies Correctly 24-14 Turning Off Logging 24-15 Setting Query Limits 24-16 Pushing Calculations to the Database 24-17 Exposing Materialized Views in the Physical Layer 24-18 Using Database Hints 24-19 Setting the NQSConfig.ini Parameters 24-20 Summary 24-22

25 Oracle BI Repository Design Principles

Objectives 25-2 Lesson Structure 25-3 Physical Layer Design Principles 25-4 Using the File > Import Option 25-5 Creating Aliases for Physical Tables 25-6 Creating Aliases to Avoid Circular Joins 25-7 Creating Canonical Time 25-8 Setting the Physical Table Caching Property 25-9 Setting Connection Pool Properties 25-10 Creating Additional Connection Pools 25-11 BMM Layer Design Principles 25-12 Multi-User Development 25-14 Consistency Check 25-15 Separate Business Models 25-16 Logical Tables 25-17

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 19: Student Guide OBIEE 1

xix

Time Dimension Logical Levels 25-18 Time Dimension Logical Structure 25-19 Logical Dimension Table Columns 25-20 Logical Fact Table Columns 25-21 Logical Joins 25-22 Calculated Measures 25-23 Logical Levels 25-24 WHERE Clause Filters 25-25 Avoiding Snowflaking 25-26 Dimension Hierarchies: General 25-27 Dimension Hierarchies: Levels 25-28 Dimension Hierarchies: Number of Elements 25-29 Dimension Hierarchies: Drilldown 25-30 Aggregates 25-31 Presentation Layer Design Principles 25-32 Subject Areas 25-33 Development with End Users in Mind 25-35 Role-Based Subject Areas 25-36 Presentation Tables 25-37 Rule of Seven 25-38 Fact Tables 25-39 Implicit Fact Columns 25-40 Canonical Time 25-41 Secondary Time Dimension 25-42 Nesting Presentation Tables 25-43 Presentation Object Names 25-44 Presentation Object Descriptions 25-45 Summary 25-46 Practice 25-1: Exploring Applied Design Principles 25-47

A Model First Development Methodology

Model First Development Methodology: Overview A-2 Central Tenets of the Model First Development Methodology A-3 Baseline Performance Analysis A-4 Defining the Business Model: Dimensional Matrix A-6 Dimensional Matrix: Example A-7 Drill to Levels for More-Detailed Performance Requirements A-8 Focus on the Business Model A-9 Leverage Oracle BI “Legless” Applications A-10 Use Oracle BI Data Mart Automation A-11

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 20: Student Guide OBIEE 1

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 21: Student Guide OBIEE 1

Copyright © 2008, Oracle. All rights reserved.

Course Introduction

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 22: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 2

Copyright © 2008, Oracle. All rights reserved.

Lesson Agenda

This lesson provides an introduction to the:• Instructor and class participants• Training site information• Course:

– Audience– Prerequisites– Goal– Objectives– Methodology– Materials– Agenda

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 23: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 3

Copyright © 2008, Oracle. All rights reserved.

Instructor and Class Participants

• Who are you?– Name– Company– Role

• What is your prior experience?– Business intelligence– Data warehouse design– Database design– Oracle BI applications

• How do you expect to benefit from this course?

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 24: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 4

Copyright © 2008, Oracle. All rights reserved.

Training Site Information

• Bathrooms

• Telephones

• Fire exits

• Class duration andbreaks

• Meals andrefreshments

• Questions?

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 25: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 5

Copyright © 2008, Oracle. All rights reserved.

Course Audience

This course is intended for:• Application developers• Business intelligence developers• Business analysts• Data modelers• Database designers• Data warehouse analysts• Technical consultants

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 26: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 6

Copyright © 2008, Oracle. All rights reserved.

Course Prerequisites

Required Oracle University courses:• Oracle BI 10g: Analytics Overview

Recommended Oracle University courses:• Oracle BI Suite EE 10gR3: Create Reports and Dashboards

Recommended experience:• Business intelligence• Data warehouse design• Data modeling• Database design • Basic SQL

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 27: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 7

Copyright © 2008, Oracle. All rights reserved.

Course Goal

To enable students to build and deploy an Oracle Business Intelligence repository.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 28: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 8

Copyright © 2008, Oracle. All rights reserved.

Course Objectives

• Build the Physical, Business Model and Mapping, and Presentation layers of a repository.

• Set up query logging for testing and debugging.• Use Oracle BI Answers to run queries to test and validate a

repository.• Add multiple sources to business model objects.• Build simple and calculated measures for a fact table.• Create dimension hierarchies and level-based measures.• Model aggregate tables to speed up processing.• Model partitions and fragments to improve application

performance and usability.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 29: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 9

Copyright © 2008, Oracle. All rights reserved.

Course Objectives

• Use variables to streamline administrative tasks and dynamically modify metadata content.

• Use time series functions to support historical time comparison analyses.

• Use bridge tables to resolve many-to-many relationships between dimension and fact tables.

• Use helper tables to maintain team-based hierarchical relationships in a dimension table.

• Configure Oracle BI to support multilingual environments.• Use implicit fact columns to select fact tables for dimension-

only queries.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 30: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 10

Copyright © 2008, Oracle. All rights reserved.

Course Objectives

• Create a repository using a multidimensional data source.• Set up security to authenticate users and assign appropriate

permissions and privileges.• Apply cache management techniques to maintain and

enhance query performance.• Enable usage tracking to track queries and database usage,

and improve query performance.• Set up and use a multi-user development environment.• Use Administration Tool utilities and wizards to perform

administrative tasks.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 31: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 11

Copyright © 2008, Oracle. All rights reserved.

Course Objectives

• Identify best practices for optimizing end-user query performance when implementing Oracle BI Enterprise Edition.

• Identify and apply repository design principles and best practices.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 32: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 12

Copyright © 2008, Oracle. All rights reserved.

Course Methodology

The subject matter is delivered through: • Lectures and slide presentations • Software demonstrations • Class discussions• Hands-on practices

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 33: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 13

Copyright © 2008, Oracle. All rights reserved.

Course Materials

Student Guide• All slides presented during lectures

Practice Guide• Hands-on practices and solutions

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 34: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 14

Copyright © 2008, Oracle. All rights reserved.

Course Agenda

Day One:• Lesson I: Course Introduction • Lesson 1: Repository Basics• Lesson 2: Building the Physical Layer of a Repository• Lesson 3: Building the Business Model and Mapping Layer

of a Repository• Lesson 4: Building the Presentation Layer of a Repository• Lesson 5: Testing and Validating a Repository

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 35: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 15

Copyright © 2008, Oracle. All rights reserved.

Course Agenda

Day Two:• Lesson 6: Adding Multiple Logical Table Sources• Lesson 7: Adding Calculations to a Fact • Lesson 8: Creating Dimension Hierarchies and

Level-Based Measures• Lesson 9: Using Aggregates• Lesson 10: Using Partitions and Fragments

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 36: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 16

Copyright © 2008, Oracle. All rights reserved.

Course Agenda

Day Three:• Lesson 11: Using Repository Variables • Lesson 12: Modeling Time Series Data• Lesson 13: Modeling Many-to-Many Relationships• Lesson 14: Localizing Oracle BI Metadata• Lesson 15: Localizing Oracle BI Data

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 37: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 17

Copyright © 2008, Oracle. All rights reserved.

Course Agenda

Day Four:• Lesson 16: Setting an Implicit Fact Column• Lesson 17: Integrating Third-Party Reporting Tools• Lesson 18: Creating Repositories from Multidimensional

Data Sources• Lesson 19: Security• Lesson 20: Cache Management

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 38: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 18

Copyright © 2008, Oracle. All rights reserved.

Course Agenda

Day Five:• Lesson 21: Enabling Usage Tracking• Lesson 22: Multi-User Development• Lesson 23: Using Administration Tool Utilities• Lesson 24: Optimizing Query Performance• Lesson 25: Oracle BI Repository Design Principles

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 39: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories I - 19

Copyright © 2008, Oracle. All rights reserved.

Summary

This lesson provided an introduction to the:• Instructor and class participants• Training site information• Course:

– Audience– Prerequisites– Goal– Objectives– Methodology– Materials– Agenda

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 40: Student Guide OBIEE 1

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 41: Student Guide OBIEE 1

Copyright © 2008, Oracle. All rights reserved.

Repository Basics

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 42: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 2

Copyright © 2008, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to:• Identify and describe the major components of the Oracle BI

architecture• Identify and describe the three layers of an Oracle BI

repository and how they relate to each other• Use the Oracle BI Administration Tool to explore repository

objects

ObjectivesThis lesson provides foundational information to set the context for the remainder of this course. An understanding of architecture components, the basics of the Administration Tool, and repository structure should enable you to build a working Oracle BI repository.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 43: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 3

Copyright © 2008, Oracle. All rights reserved.

Oracle BI Architecture Components

This lesson describes the following architecture components and their relationships:• Clients• Oracle BI Presentation Services • Oracle BI Server • Oracle BI repository• Data sources

ClientsOracle BI

Presentation Services

Oracle BI

Server

Datasources

Oracle BI Architecture ComponentsThis lesson provides a high-level overview of the Oracle BI architecture components that are critical to understanding the course.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 44: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 4

Copyright © 2008, Oracle. All rights reserved.

Clients

Provide access to business intelligence information• Oracle BI Answers

– Is a set of graphical tools used to build, view, and modify Oracle BI requests

• Oracle BI Interactive Dashboards– Display the results of Answers requests and other items

• Oracle BI Administration Tool– Is used to build an Oracle BI repository

ClientsOracle BI

Presentation Services

Oracle BI

Server

Datasources

ClientsOracle BI Answers and Oracle BI Interactive Dashboards are examples of clients that provide access to business intelligence information via a Web browser. Oracle BI Administration Tool is a Windows-based application.Oracle BI AnswersOracle BI Answers is a set of graphical tools used to build, view, and modify Oracle BI requests. The requests are queries against an organization’s data.Oracle BI Interactive DashboardsAn Oracle BI Interactive Dashboards is used to display the results of Answers requests that are embedded in the dashboard, and other items, such as links to saved requests in Answers, links to Web sites, Active-X objects, HTML Text, and links to documents. Dashboards are typically created by users with administrator permissions. However, dashboards are simple to create via the user-friendly Oracle BI interface. After dashboards are created, they can be shared by common groups of users or can be personal (not shared).Oracle BI Administration ToolThe Oracle BI Administration Tool is used to build the Oracle BI repository and is the focus of this course.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 45: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 5

Copyright © 2008, Oracle. All rights reserved.

Oracle BI Presentation Services

• Provides the processing to visualize the information for client consumption

• Is implemented as an extension to a Web server• Uses a catalog to store saved content• Receives data from Oracle BI Server and provides it to the

client that requested it

ClientsOracle BI

Presentation Services

Datasources

Oracle BI

Server

Oracle BI Presentation Services Oracle BI Presentation Services is an extension to an existing Web server:

• It receives processing instructions from an Oracle BI client, retrieves the requested information from Oracle BI server, and then renders the information inside the requesting client.

• It uses a catalog to store saved content, such as Oracle BI requests and Oracle BI Interactive Dashboards.

• It runs as a service in the Windows environment on your classroom machine.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 46: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 6

Copyright © 2008, Oracle. All rights reserved.

Oracle BI Server

• Is the core server behind Oracle Business Intelligence• Provides efficient processing to access physical data

sources and structure information intelligently– Uses metadata to direct processing – Generates dynamic SQL to query data in the physical data

sources– Connects natively or through ODBC to the RDBMS – Structures results to satisfy requests– Provides BI data to Oracle BI Presentation Services

ClientsOracle BI

Presentation Services

Datasources

Oracle BI

Server

Oracle BI ServerOracle BI Server is the core server behind Oracle Business Intelligence. It is an optimized query engine that receives analytical requests, intelligently accesses multiple physical data sources, generates SQL to query data in the data sources, and then structures the results to satisfy the requests. It also handles requests from a variety of front ends, including Oracle BI applications as well as third-party tools. Oracle BI Server allows a single information request to query multiple data sources, providing information access to members of the enterprise and, in Web-based applications, to suppliers, customers, prospects, or any authorized user with Web access.Oracle BI Server serves as a portal to structured data that resides in one or more data sources: multiple data marts, the Oracle BI Data Warehouse, an enterprise data warehouse, an operational data store, transaction system databases, personal databases, and so on. Transparent to both end users and query tools, Oracle BI Server functions as the integrating component of a complex decision support system by acting as a layer of abstraction and unification over the underlying databases. This offers users a simplified query environment in which they can ask business questions that span information sources across the enterprise and beyond. Oracle BI Server runs as a service in the Windows environment on your classroom machine.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 47: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 7

Copyright © 2008, Oracle. All rights reserved.

Oracle BI Repository

• Stores the metadata used by Oracle BI Server• Is accessed and configured using the Oracle BI

Administration Tool, which you use to:– Import metadata from databases and other data sources– Simplify and reorganize the metadata into business models– Structure the business model for presentation to users who

request information

Repository

ClientsOracle BI

Presentation Services

Oracle BI

Server

Datasources

Oracle BI RepositoryOracle BI Server stores metadata in repositories. The Oracle BI Administration Tool has a graphical user interface that allows server administrators to set up these repositories. An Oracle BI Server repository consists of three layers. Each layer appears in a separate pane in the Oracle BI Administration Tool user interface and has a tree structure. You can expand each object to see a list of its components. These layers are not visible to the end user.In this course, you learn:

• How to import metadata from databases and other data sources• How to simplify and reorganize the imported metadata into business models • How to structure the business model for presentation to users who request business intelligence

information via Oracle BI clients, such as Oracle BI Answers and Interactive Dashboards.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 48: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 8

Copyright © 2008, Oracle. All rights reserved.

Data Sources

• Contain the business data that users want to analyze• Are accessed by Oracle BI Server• Can be in any format, such as:

– Relational databases– Online analytical processing (OLAP) databases– Flat files– Spreadsheets– XML for Analysis (XMLA)

ClientsOracle BI

Presentation Services

Oracle BI

Server

Datasources

Data SourcesData sources are the physical sources where the business data is stored. They can be in any format, including transactional databases, online analytical processing databases, text files, XMLA, spreadsheets, and so on. A connection to the data source is created and then used by Oracle BI Server. The data source connection can be defined to use native drivers or Open Database Connectivity (ODBC). You learn more about this when you create the Physical layer of a repository in the lesson titled “Building the Physical Layer of a Repository.”SQL is generated by Oracle BI Server against the data sources using the data source connection, information from the repository, and database-specific parameters stored in a DBFeatures.inifile. Thus, Oracle BI Server is not just a SQL generator. It determines the best source and the optimal way to access data. In some cases, Oracle BI Server takes on operations that are more efficient for it to perform rather than the host data source.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 49: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 9

Copyright © 2008, Oracle. All rights reserved.

Sample Request Processing

1. User views a dashboard or submits a request.2. Oracle BI Presentation Services makes a request to Oracle

BI Server to retrieve the requested data.3. Using the repository file, Oracle BI Server optimizes

functions to request the data from the data sources.4. Oracle BI Server receives the data from the data sources

and processes as necessary.5. Oracle BI Server passes the data to Oracle BI Presentation

Services.6. Oracle BI Presentation Services formats the data and

sends it to the client.

ClientsOracle BI

Pres Services

Oracle BI Server

Datasources

1 2 3

456

Sample Request ProcessingThis is a simplified example of how an Oracle BI request is processed. A user accesses a dashboard or submits a request in Answers. The request is received by Oracle BI Presentation Services, which routes the request to Oracle BI Server. Oracle BI Server uses the repository to determine the best way to access the requested data. Then it sends the SQL or other requests to the sources and combines the results or provides further processing. The Oracle BI Server then sends the data back to Oracle BI Presentation Services, which formats the data as appropriate and sends it to the client for display.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 50: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 10

Copyright © 2008, Oracle. All rights reserved.

Oracle BI Administration Tool

Exposes the Oracle BI repository as three separate panes, called layers:• Physical • Business Model and Mapping (BMM)• Presentation

Oracle BI Administration ToolYou develop a repository using the Oracle BI Administration Tool. The main window of the Administration Tool provides a graphical representation of the three layers of a repository. In this course, you learn how to use the Oracle BI Administration Tool to build, edit, manage, and administer Oracle BI repositories.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 51: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 11

Copyright © 2008, Oracle. All rights reserved.

Physical Layer

• Contains objects representing the physical data sources to which Oracle BI Server submits queries

• May contain multiple data sources• Is typically the first layer built in the repository

Data sources

Physical LayerThe Physical layer contains information about the physical data sources to which Oracle BI Server submits queries. The most common way to populate the Physical layer is by importing metadata from databases and other data sources. The data sources can be of the same or different varieties. When you import metadata, many of the properties of the data sources are configured automatically based on the information gathered during the import process. After import, you can also define other attributes of the physical data source, such as join relationships, that might not exist in the data source metadata. There can be one or more data sources in the Physical layer, including databases, spreadsheets, and XML documents. In this example, there are two data sources in the Physical layer: ORCL and xls_quota.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 52: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 12

Copyright © 2008, Oracle. All rights reserved.

Physical Layer Objects

Are objects in the Physical layer, such as connection pools, folders, tables, columns, and keys• Expand a database object to display the objects it contains.

Database

Connection pool

Schema folder

Tables

Columns

Key

Physical Layer ObjectsThe database object is the highest object in the Physical layer. Each database object in the Physical layer contains a connection pool (SUPPLIER CP in this example). A connection pool contains information about the connection between Oracle BI Server and the data source. For example, the connection pool contains data source name information used to connect to a data source, the number of connections allowed, timeout information, and other connectivity-related administrative details. There is at least one connection pool for each data source. You can organize the Physical layer into folders, if desired. The folders shown here are created by default when the schema is first imported. Additional folders are optional. A schema folder, SUPPLIER2 in this example, contains tables, columns, and keys for a physical schema. The table, column, and key objects provide the metadata necessary for Oracle BI Server to access the actual physical sources with SQL requests. Each object in the Physical layer has a set of properties associated with it. To view the properties, double-click the object’s icon to open the Properties dialog box.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 53: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 13

Copyright © 2008, Oracle. All rights reserved.

Business Model and Mapping Layer

Is where physical schemas are simplified and reorganized to form the basis of the users’ view of the data.

Business Model and Mapping LayerThe Business Model and Mapping layer of the Administration Tool defines the business, or logical, models of the data and specifies the mapping between the business models and the Physical layer schemas. This is where the physical schemas are simplified to form the basis for the users’ view of the data. The Business Model and Mapping layer of the Administration Tool can contain one or more business model objects. A business model object contains the business model definitions and the mappings from logical to physical tables for the business model.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 54: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 14

Copyright © 2008, Oracle. All rights reserved.

Business Model and Mapping Layer Objects

The Business Model and Mapping layer contains business model objects.

Business model

Logical dimension tables

Logical table source

Logical columns

Logical fact table

Measures

Dimension hierarchies

Business Model and Mapping Layer ObjectsThe Business Model and Mapping Layer contains business model objects. There can be multiple business models in this layer, although there is only one in this example. The business model object (SupplierSales in this example) is the highest-level object, and it contains logical tables: Customers, Periods, Products, and SalesFacts, in this example. Logical tables contain logical columns. Logical tables also have a Sources folder that contains one or more logical table sources. These logical table sources define the mappings between the logical table and the physical tables where the data is actually stored. In this example, the data for the SalesFacts logical table is stored in the D1_ORDERS2 physical table, and the logical table source is Orders. In the Business Model and Mapping layer, data is separated and simplified into facts and dimensions. Recall that facts contain the business measures, and dimensions contain descriptive attributes that qualify the facts. Each business model contains one or more dimension tables and fact tables. A dimension table appears with a white table icon. A fact table appears with a yellow icon. The business model also contains dimension hierarchies, in this example: CustomerDim, PeriodDim, and ProductDim. Dimension hierarchies introduce formal hierarchies into a business model, establish levels for data groupings and calculations, and provide paths for drilldown in end-user tools, such as Oracle BI Answers.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 55: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 15

Copyright © 2008, Oracle. All rights reserved.

Business Model Mappings

• Business Model and Mapping layer objects map to source data objects in the Physical layer.

• Mappings are typically not one-to-one:– Business models may map to multiple data sources.– Logical tables may map to multiple physical tables.– Logical columns may map to multiple physical columns.

Mappings

Business Model MappingsThe Business Model and Mapping layer of the Administration Tool can contain one or more business model objects. A business model object contains other business model object definitions and the mappings from logical to physical tables for the business model. SupplierSales is the business model object in this example. Business model objects map to the source data objects in the Physical layer. Business models map to physical schemas. Logical tables map to physical tables. Logical columns map to physical columns, and so on. The arrows convey the mappings. There is no one-to-one mapping between business model objects and physical objects. In fact, a business model can have multiple data sources, a logical table can have multiple physical tables as sources, and a logical column can have multiple physical columns as sources. In the Administration Tool, the mappings are specified at the logical Business Model and Mapping layer, not the Physical layer. The mappings can include transformations and formulas. Thus, you use the Business Model and Mapping layer to define the meaning and content of each physical source in business model terms. Oracle BI Server then uses these business model definitions to pick the appropriate sources for each data request. For more information about business model mappings, see the lesson titled “Building the Business Model and Mapping Layer of a Repository.” Also note that, in this example, the business model objects have been renamed. For example, the name of the logical table that maps to the D1_CUSTOMER2physical table has been changed to Customers. You can change the names of business model objects independently from corresponding physical model object names and properties, and vice versa. The tool keeps track of the changes. Techniques for making these changes are covered in detail later in this course.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 56: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 16

Copyright © 2008, Oracle. All rights reserved.

Measures

• Are the facts that a business uses to evaluate its performance

• Can be calculations that define measurable quantities • Are created on logical columns in the fact table• Have a defined aggregation rule

Icon denotes an aggregation rule.

MeasuresIn a business model, some logical columns serve as measures. Measures need to be computed correctly from the base physical data when Oracle BI Server receives a query from a client. In this case, you want Dollars, Units Shipped, Units Ordered, and Net Weight Shipped to be aggregated by summing. The third bullet refers to setting aggregation on a column. By default, a column has no aggregation rule defined. When you define an aggregation rule on a column, the icon changes to reflect this. After you define an aggregation rule on a column, the aggregation is the default. In the example in the slide, the sum aggregation rule has been defined for the Dollars, Units Shipped, Units Ordered, and New Weight Shipped columns. The calculations are sent to the database or processed by Oracle BI Server. Measures may not require any calculations. For example, they may be a “regular” logical column and simply return the data from the source.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 57: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 17

Copyright © 2008, Oracle. All rights reserved.

Presentation Layer

• Contains presentation objects that provide a customized view of a business model to users

• Simplifies and organizes the business model to make it easy for users to understand and query

• Exposes only the data meaningful to the users

Presentation LayerThe Presentation layer provides a means to further simplify or customize the business model for end users. Simplifying the view of the data for users makes it easier for users to craft queries based on their business needs. For example, you can organize columns differently than the table structure in the Business Model and Mapping layer, show fewer columns, and rename columns so that they are more understandable to users.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 58: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 18

Copyright © 2008, Oracle. All rights reserved.

Presentation Layer Mappings

Presentation layer objects map to objects in the Business Model and Mapping layer.

Presentation catalogs map to the business

model.

Presentation tables may map to logical tables.

Presentation columns map to logical columns.

Presentation Layer MappingsPresentation layer objects map to objects in the Business Model and Mapping layer. Presentation catalogs map to business models, presentation tables may map to logical tables, and presentation columns map to logical columns. A presentation catalog can map to a single business model only. However, multiple presentation catalogs can reference the same business model and a presentation table can contain columns from one or more logical tables. Thus, you can use presentation catalogs and tables to organize columns into categories that the users can understand. Presentation tables do not necessarily have a one-to-one mapping to a logical table. Presentation tables are folders used for organizing columns and can be organized and structured differently from logical tables in the Business Model and Mapping layer.You can create Presentation layer objects by dragging and dropping objects from the Business Model and Mapping layer. Corresponding objects are automatically created in the Presentation layer. The presentation table and column names are, by default, identical to the logical names in the Business Model and Mapping layer, but can be renamed. Thus, the names and object properties of the presentation tables are independent of the logical table properties. It is also possible to nest presentation tables so they appear as nested folders in the Answers UI. Note that these are examples and that presentation tables do not have to mirror business model logical table and columns as the diagram implies.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 59: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 19

Copyright © 2008, Oracle. All rights reserved.

Presentation Layer Defines User Interface

Presentation layer objects define the interface that users see to query the data from the data sources.

Presentation folder

Presentationcolumn

Presentation catalog Subject area

Folder

Column

Presentation Layer Defines User InterfacePresentation layer objects define the interface that users see to query the data from the data sources. Presentation layer objects appear as subject areas, folders, and columns in Oracle BI Answers.

• Presentation catalogs in the Presentation layer are seen as subject areas in Oracle BI Answers. • Presentation folders in the Presentation layer are seen as folders in Oracle BI Answers. • Presentation columns are seen as columns within the Oracle BI Answers folders.

Presentation layer objects can be renamed and reorganized, and they use terminology that is meaningful to the user.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 60: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 20

Copyright © 2008, Oracle. All rights reserved.

Repository Directory

Repository files reside in the …\Oracle BI\server\Repository directory, where the Oracle BI software is installed.

Default location of repository files

Oracle BI Repository file

Repository DirectoryRepository files are stored by default in the \OracleBI\server\Repository directory where the Oracle BI software is installed. From this directory, repository files are loaded by Oracle BI Server or they can be opened for editing. To open repository files for editing, you double-click the file in this directory, or open the file using the Administration Tool. Repository files can be opened in two modes, which are discussed on the next page.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 61: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 21

Copyright © 2008, Oracle. All rights reserved.

Repository Modes

Repository files can be opened for editing in offline or online mode.• Offline

– Repository is not loaded into Oracle BI Server memory.• Online:

– Repository is loaded into Oracle BI Server memory.– Administrators can perform tasks not available in offline

mode:— Manage scheduled jobs— Manage user sessions— Manage the query cache— Manage clustered servers— Stop Oracle BI Server

Repository ModesYou can open a repository for editing in online or offline mode. You can perform different tasks based on the mode in which you opened the repository.Offline ModeUse offline mode to view and modify a repository while it is not loaded into the Oracle BI Server. If you attempt to open a repository in offline mode while it is loaded into the Oracle BI Server, the repository opens in read-only mode. Only one Administration Tool session at a time can edit a repository in offline mode.Online ModeUse online mode to view and modify a repository while it is loaded into the Oracle BI Server. The Oracle BI Server must be running to open a repository in online mode. There are certain things you can do in online mode that you cannot do in offline mode. In online mode, you can perform the following tasks:

• Manage scheduled jobs.• Manage user sessions.• Manage the query cache.• Manage clustered servers.• Stop Oracle BI Server.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 62: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 22

Copyright © 2008, Oracle. All rights reserved.

Adding an Entry in NQSConfig.ini

NQSConfig.ini is a configuration file read by Oracle BI Server to determine which repository to load into memory.

Repository to load

Commented out

Default location of NQSConfig.ini

file

Adding an Entry in the NQSConfig.ini FileAfter you build a repository, you need to add an entry in the NQSConfig.ini file for the repository. The entry allows Oracle BI Server to load the repository into memory when it is started. There can be multiple repositories listed in the repository section of this file. For example, multiple repositories might be listed for testing purposes. If there are multiple repositories, Oracle BI Server will read them all when it starts up. Only one repository can be loaded for access by a particular Oracle BI Presentation Server instance. One repository must be specified as the default. If multiple repositories are specified as the default repository, the last one listed becomes the default repository. Any line beginning with a pound sign (#) will be treated as a comment. If the repository file name contains a space, enclose the file name within single quotation marks.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 63: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 23

Copyright © 2008, Oracle. All rights reserved.

Reloading Server Metadata

Click the Reload Server Metadata link in Answers to refresh the view of Oracle BI metadata.

Reload Server Metadata link

Reloading Server MetadataWhen changes have been made to saved content or to the Oracle BI Server metadata, you can refresh the Answers display to access the most current information. To refresh the view of the Oracle BI Server metadata for subject areas, click the Reload Server Metadata link at the bottom of the selection pane. To refresh the information for saved requests, filters, briefing books, and dashboard content, click the Refresh Display link.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 64: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 24

Copyright © 2008, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to:• Identify and describe the major components of the Oracle BI

architecture• Identify and describe the three layers of an Oracle BI

Repository and how they relate to each other• Use the Oracle BI Administration Tool to explore repository

objects

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 65: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 1 - 25

Copyright © 2008, Oracle. All rights reserved.

Practice 1-1 Overview: Exploring an Oracle BI Repository

This practice covers the following topics:• Exploring the Physical layer of a repository• Exploring the Business Model and Mapping layer of a

repository• Exploring the Presentation layer of a repository• Loading a repository into memory• Submitting a request using Oracle BI Answers

Practice 1-1 Overview: Exploring an Oracle BI RepositoryThis practice familiarizes you with the Administration Tool. It also helps you understand the three layers of an Oracle BI Repository and the relationships among them.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 66: Student Guide OBIEE 1

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 67: Student Guide OBIEE 1

Copyright © 2008, Oracle. All rights reserved.

Building the Physical Layer of a Repository

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 68: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 2

Copyright © 2008, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to:• Identify and describe the objects in the Physical layer of a

repository• Create the Physical layer of a repository

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 69: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 3

Copyright © 2008, Oracle. All rights reserved.

Physical Layer

• Contains objects representing the physical data sources to which Oracle BI Server submits queries

• May contain multiple data sources• Is typically the first layer built in the repository

Data sources

Physical LayerThe Physical layer defines the data sources to which Oracle BI Server submits queries and the relationships between physical databases and other data sources that are used to process multiple data source queries. The most common way to populate the Physical layer is by importing metadata from databases and other data sources. The data sources can be of the same or different varieties. You can import schemas or portions of schemas from existing data sources. Additionally, you can create the Physical layer manually. When you import metadata, many of the properties of the data sources are configured automatically based on the information gathered during the import process. After import, you can also define other attributes of the physical data source, such as join relationships, that might not exist in the data source metadata. There can be one or more data sources in the Physical layer, including databases, spreadsheets, and Extensible Markup Language (XML) documents. In this example, there are two data sources in the Physical layer: ORCL and xls_quota.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 70: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 4

Copyright © 2008, Oracle. All rights reserved.

Physical Layer Objects

Are objects in the Physical layer, such as connection pools, folders, tables, columns, and keys• Expand a database object to display the objects it contains.

Database

Connection pool

Schema folder

Tables

Columns

Key

Physical Layer ObjectsThe database object is the highest object in the Physical layer. Each database object in the Physical layer contains a connection pool, SUPPLIER CP in this example. A connection pool contains information about the connection between Oracle BI Server and the data source. You can organize the Physical layer into folders, if desired. The folders shown here are created by default when the schema is first imported. Additional folders are optional. A schema folder, SUPPLIER2 in this example, contains tables, columns, and keys for a physical schema. The table, column, and key objects provide the metadata necessary for Oracle BI Server to access the actual physical sources with SQL requests. Each object in the Physical layer has a set of properties associated with it. To view an object’s properties, double-click the object’s icon to open the properties dialog box. Each of the objects shown here is discussed in more detail in the following slides.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 71: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 5

Copyright © 2008, Oracle. All rights reserved.

Database Object

• Is the highest-level object in the Physical layer• Defines the data source to which Oracle BI Server submits

queries

Database object

Database ObjectThe database object is the highest-level object in the Physical layer. It defines the data source to which Oracle BI Server submits queries. Importing a schema automatically creates a database object for the schema in the Physical layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 72: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 6

Copyright © 2008, Oracle. All rights reserved.

Database Object: General Properties

Click the General tab to view and set general properties for a database object.

Name

Type

Database Object: General PropertiesImporting a schema automatically creates a database object for it, but sometimes you need to set up the database object properties manually. Double-click the database object or right-click and select Properties to open the Database Object Properties dialog box.

• If you import the physical schema into the Physical layer, the database name and type are usually assigned automatically. However, if the server cannot determine the database type, an approximate database type is assigned to the database object. If necessary, replace the database type with the closest matching entry from the database drop-down menu.

• “Persist connection pool” is a database property that is typically used to support queries in Marketing applications. Refer to the Oracle BI Server Administration Guide.

• When the “Allow populate queries by default” check box is selected, you can execute POPULATE SQL. If you want most but not all users to be able to execute POPULATE SQL, select this option and then limit queries for specific users or groups using Security Manager. You learn more about Security Manager in the lesson titled “Security.”

• When the “Allow direct database requests by default” check box is selected, you can execute physical queries directly against the database from the Answers UI. If you want most but not all users to be able to execute physical queries, select this option and then limit queries for specific users or groups.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 73: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 7

Copyright © 2008, Oracle. All rights reserved.

Database Object: Features

Click the Features tab to view and set the SQL features that Oracle BI Server uses with this data source.

Default SQL features for this

data source

Enable or disable feature

Database Object: Features When you import the schema or specify a database type on the General tab of the Database dialog box, the Features table is automatically populated with default values appropriate for the database type. These are the SQL features that Oracle BI Server uses with this data source. You can customize the default query features for a database. For example, if a data source supports left outer join queries, but you want to prohibit the server from sending such queries to a particular database, you can change this default setting in the Feature table. But be careful when modifying the Features table. If you enable SQL features that the database does not support, your query may return errors and unexpected results. If you disable supported SQL features, the server may issue less efficient SQL to the database.

• The Default check box identifies the default SQL features for this data source. • The Value check box allows you to enable or disable a query type. It is strongly recommended

that you do not disable the default SQL features. • The Ask DBMS button is used only if you are installing and querying a database that has no

Features table. It allows you to query a database for the SQL features it supports. Be careful when using Ask DBMS. The results of the features query are not always an accurate reflection of the SQL features actually supported by the data source. You should use this functionality only with the assistance of Oracle Technical Support.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 74: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 8

Database Object: Features (continued)• The “Revert to defaults” button restores the default features values. • The Find button allows you to enter a string to help you locate a feature in the list.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 75: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 9

Copyright © 2008, Oracle. All rights reserved.

Connection Pool

• Defines how Oracle BI Server connects to a data source• Specifies the ODBC or native data source name• Allows multiple users to share a pool of data source

connections

Data source name

Connection pooling enabled

Shared logon username and

password

Maximum number of connections

Connection pool name

Connection PoolFor each data source, there is at least one corresponding connection pool. The connection pool contains information about the connection between Oracle BI Server and a data source. Typically, the database object and connection pool are created automatically when you import the physical schema. It is strongly recommended that you use Oracle Call Interface (OCI) for connecting to an Oracle data source. Open Database Connectivity (ODBC) should be used only to import from an Oracle data source. The connection pool contains data source name (DSN) information used to connect to a data source, the number of connections allowed, timeout information, and other connectivity-related administrative details. Connection pools allow multiple concurrent data source requests (queries) to share a single database connection, reducing the overhead of connecting to a database. You can create multiple connection pools to improve the performance for groups of users.Selecting the “Enable connection pooling” check box allows multiple concurrent query requests to share a single database connection. This reduces the overhead of connecting to a database because it does not open and close a new connection for every query. If you do not select this option, each query sent to the database opens a new connection.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 76: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 10

Copyright © 2008, Oracle. All rights reserved.

Schema Folder

Is an optional display folder that contains tables and columns for a physical schema• To create a schema folder, right-click a database object and

select New Object > Physical Schema.

Schema folder

Schema FolderThe schema folder contains tables and columns for a physical schema. Schema folder objects are optional in the Physical layer of the Administration Tool. You must create a database object before you create a schema object. A schema folder is created by default when you first import from a data source. To create a new schema object, right-click the database object and select New Object > Physical Schema.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 77: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 11

Copyright © 2008, Oracle. All rights reserved.

Physical Table

• Is an object that corresponds to a table in a physical data source

• Is typically imported from a database or other data source• Provides the metadata necessary for Oracle BI Server to

access the tables with SQL requests

Physical table

Physical TableA physical table is an object in the Physical layer of the Administration Tool that corresponds to a table in a physical database. Physical tables are usually imported from a database or another data source, and they provide the metadata necessary for Oracle BI Server to access the tables with SQL requests. When data source definitions are imported, no actual data is moved. Data remains in the physical data source.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 78: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 12

Copyright © 2008, Oracle. All rights reserved.

Physical Table Properties

Double-click a physical table object to view its properties:

Name

Table type

Cacheable

Use tabs to create, view, or modify other properties.

Physical Table PropertiesClick the General tab to view and set general properties for a physical table object. By default, the name corresponds to the table name defined during import, but you can rename it.

• The Table Type drop-down list allows you to specify the physical table object type. Physical Table is the default. You can also define the physical table as a stored procedure or a SELECTstatement. When you select either of these options, a text pane below the Table Type drop-down list becomes active, allowing you to enter the stored procedure or the SELECT statement. Requests against this table then execute the stored procedure or the SELECT statement.

• You can use a dynamic name to specify the name of a table object. You must define a session variable before you can set a dynamic name. You learn more about variables in the lesson titled “Using Repository Variables.”

• Select Cacheable to include the table in the Oracle BI Server query cache. This is selected by default. Select “Cache never expires” or set “Cache persistence time” to define how long table entries should persist in the cache. You learn more about caching in the lesson titled “Cache Management.”

• Database hints are instructions placed within a SQL statement that tell the database query optimizer what the most efficient way to execute the statement is. Hints override the optimizer’s execution plan, so you can use hints to improve performance by forcing the optimizer to use a more efficient plan.

• The Columns, Keys, and Foreign Keys tabs allow you to view, create new, and edit existing columns, keys, and foreign keys that are associated with the table.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 79: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 13

Copyright © 2008, Oracle. All rights reserved.

Physical Table: Alias

Is a virtual physical table object that points to a physical table object• Right-click a physical table and select New Object > Alias.• Provide a name for the alias table.• The alias table appears with an alias icon in the Physical

layer.

Alias name

Source table Alias synchronization is automatic.

Physical Table: AliasAn alias table is a virtual physical table object that points to a physical table object. An alias table in the Physical layer of the repository is just like any alias used in standard SQL notation. That is, you want to reference the same table twice in a given SQL statement, but to avoid circularity in the references, you use a different name. A common use for aliases is role-playing dimensions, where a single dimension simultaneously appears several times in the same fact table. For example, an order date and a shipping date in a fact table may both point to the same column in a physical dimension table, but each role is presented as a separately labeled alias.Alias SynchronizationSynchronization is the act of ensuring that the source table and related alias tables have the same column definitions. An alias table always inherits all the column definitions from the source table and synchronization happens automatically. Thus, columns in an alias table cannot be modified. All columns opened from an alias table become read-only. Creating source column creates the same column on all its alias tables. Deletion of a source column automatically deletes corresponding alias columns. Modification of a source column forces the same changes to be reflected in the alias columns.To create an alias:

1. Right-click a physical table and select New Object > Alias.2. Give the alias table a name. The Table Properties dialog box displays the source table.3. The alias table appears with a green arrow alias icon in the Physical layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 80: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 14

Copyright © 2008, Oracle. All rights reserved.

Physical Table: Select Table Type

Specifies that a physical table object is a SELECT statement

Table Type

SELECT statement

Database specific SQL

Select Table TypeA Select table type specifies that the physical table object is a SELECT statement. When you select this option, the Default Initialization String text pane below the Table Type drop-down list becomes active, allowing you to enter the SELECT statement. Requests for this table will execute the SELECT statement. In this example, the SELECT statement returns all rows from D1_CUSTOMER2, where Region = 'East'. Select tables can be created manually or by duplicating an existing physical table and changing the table type. Select tables have an eyeglasses icon.For SELECT statements that are database specific, you can select the database type from the drop-down list above the text pane. At run time, if a SELECT statement has been defined for the corresponding database’s database type, the SELECT statement is executed; otherwise, the default configuration is executed.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 81: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 15

Copyright © 2008, Oracle. All rights reserved.

Physical Table: View Deployment

Creates a corresponding database view for metadata views

Select Deploy View(s).

View created in database

View DeploymentA Select table serves as an opaque view in the repository metadata, but no corresponding view is actually created in the database. The Administration Tool provides a Deploy View feature that creates a corresponding view in the database. The advantages of creating views in the database are:

• The server generates simpler queries whenever opaque view is encountered.• Query statement errors can be identified more easily.• Optimization or any other features provided by database vendors for views can be leveraged.

Not all databases can run view deployment. For example, XLS databases and nonrelational databases cannot have views deployed. To make view deployment explicit, the CREATE_VIEW_SUPPORTED feature has been added to the feature list of a database object. Only opaque views that belong to a database with this feature enabled can run view deployment.To deploy a view, right-click the object and select Deploy View. It is possible to select multiple views and deploy them simultaneously, or to deploy all views for a database, catalog, or schema. View names are restricted to 18 characters and must be alphanumeric. Views can also be undeployed, which drops the view from the database.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 82: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 16

Copyright © 2008, Oracle. All rights reserved.

Physical Column

Is an object that corresponds to a column in a physical database

Columns

Physical ColumnA physical column is an object in the Physical layer of the Administration Tool that corresponds to a column in a physical database. Each physical table object in the Physical layer has one or more physical column objects. The column properties are set automatically when the column is imported. Double-click a column to view or modify its properties.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 83: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 17

Copyright © 2008, Oracle. All rights reserved.

Key Column

Defines relationships between tables• Primary key:

– Uniquely identifies a single row of data– Consists of a column or set of columns– Is identified by a key icon

• Foreign key:– Refers to the primary key columns in another table – Is composed of a column or set of columns

Key

Key ColumnA primary key and foreign key relationship defines a one-to-many relationship between two tables. A foreign key is a column or a set of columns in one table that references the primary key columns in another table. The primary key is defined as a column or set of columns where each value is unique and identifies a single row of the table. Keys and joins help Oracle BI Server determine the fact–dimension relationships between tables. The Physical layer typically uses foreign key joins to define relationships, whereas the Business Model and Mapping layer uses logical joins to define relationships. You learn more about logical joins in the lesson titled “Building the Business Model and Mapping Layer of a Repository.” Typically, keys are defined only for dimension tables, not for fact tables.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 84: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 18

Copyright © 2008, Oracle. All rights reserved.

Joins

Represent the primary key–foreign key relationships between tables in the Physical layer

Double-click to view join properties.

Physical DiagramJoin properties

Join expression

JoinsJoins represent the relationships between tables in the Physical layer. Joins that already exist in the physical data sources are imported automatically into the Physical layer, but can be modified. When you import keys in a physical schema, the primary key–foreign key joins are automatically defined. All other joins within each database have to be defined explicitly. You need to define joins that express relationships between tables in the Physical layer of the repository. You can use the Physical Diagram feature to create joins between physical table objects. Note that complex joins can be used in this layer to express the relationships that do not involve a primary key–foreign key relationship. When you create a complex join in the Physical layer, you can specify expressions and the specific columns on which to create the join. When you create a complex join in the Business Model and Mapping layer, you do not specify expressions.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 85: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 19

Copyright © 2008, Oracle. All rights reserved.

ABC Scenario

Data for ABC resides in the SUPPLIER2 schema in an Oracle relational database, containing tables with:• Invoice data• Customer data• Product data• Period data

Import metadata using

Administration Tool.

SUPPLIER2Data source

Physical layer

ABC ScenarioThroughout this course, you build a repository based on the business requirements of ABC, a fictitious company that sells restaurant supplies. In the first practice for this lesson, you read a document that explains in detail the ABC business scenario. Because you have not yet read this document, this slide briefly introduces the ABC business requirements. ABC’s data resides in the SUPPLIER2 schema in an Oracle relational database on your student machine. The schema contains invoice fact data, and customer, product, and period dimension data. The first task is to use the Administration Tool to import metadata about the schema into the Physical layer of the repository. The remaining slides in this lesson describe the steps for completing this task.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 86: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 20

Copyright © 2008, Oracle. All rights reserved.

Implementation Steps

1. Import the physical schema.2. Select tables and columns for import.3. Import keys and joins.4. Check the import.5. Edit connection pool properties.6. Define physical keys and joins.

Implementation StepsThis is an overview of the necessary steps for building the Physical layer. Subsequent slides cover each step in detail.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 87: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 21

Copyright © 2008, Oracle. All rights reserved.

1. Import the Physical Schema

Use the Oracle BI Administration Tool to import the physical schema.

Select connection type.

Select File > Import > from Database.

1. Import the Physical SchemaPhysical schema imports can be performed using an ODBC connection type or native database gateways. Native database gateways for schema import are supported for Oracle, IBM DB2, and XML connection types. If you use an ODBC connection type, the first step is to use the ODBC Administrator to define the system data source name for the data source you want to import. This example illustrates using the Oracle Call Interface (OCI) native database gateway to import a physical schema. The most common way to populate the Physical layer is by importing from databases and other data sources. In fact, it is recommended that you always import the physical schema as opposed to building the metadata from scratch in the Physical layer. This slide illustrates the process for importing from your data source into the Oracle BI Server repository’s Physical layer. In the Oracle BI Administration Tool, select File > Import > from Database to open the Select Data Source window. Select the desired data source, populate the fields, and click OK.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 88: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 22

Copyright © 2008, Oracle. All rights reserved.

2. Select Tables and Columns for Import

Select the tables and columns needed to support the business model.

Select schema, tables, or columns for import.

Select metadata for import.

Filter tables for import.

2. Select Tables and Columns for ImportAfter you have selected the data source name, a window opens and displays the available schemas, tables, and columns. At this point you can import schemas or portions of schemas from existing data sources. When you import the physical tables, it is good practice to limit the import to only those tables that contain data that you are likely to use in the business models you create. You can use a filter (table name mask) to limit the number of tables that appear in the import list. This makes it easier to locate and select the tables that you want to import. To use a table name mask, enter a table name mask, such as D1%, and click the highest-level database folder. Tables that meet the filter criteria appear. You also need to check the type of physical metadata you want to import. The default is to import tables and keys. Note that you can also import database views, aliases, synonyms, foreign keys, and system tables.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 89: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 23

Copyright © 2008, Oracle. All rights reserved.

3. Import Keys and Joins

Keys, foreign keys, and corresponding joins are imported automatically only if they are already defined in the data source.

3. Import Keys and JoinsBased on the selections you make when you import, many properties of the physical model are configured automatically in the Physical layer. This is based on the information gathered during the import process. For example, if you import a physical schema and import keys and foreign keys, the primary key–foreign key joins are automatically defined in the Physical layer. This occurs only if the relationships are already defined in the data source. After import, you can also explicitly define other attributes of the physical data source that might not be defined in the source, such as join relationships.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 90: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 24

Copyright © 2008, Oracle. All rights reserved.

4. Check the Import

• Ensure that the correct schema, tables, columns, and keys were imported.

• Use Update Row Count and View Data features to check the connection.

Schema

Tables

Columns

Key

4. Check the ImportAfter import completes, close the import dialog box and check if the expected schemas, tables, columns, and keys exist in the Physical layer. It is also good practice to update row counts and view data to ensure that the connection is configured correctly.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 91: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 25

Copyright © 2008, Oracle. All rights reserved.

5. Edit Connection Pool Properties

After import, check or modify the connection pool properties using the Connection Pool properties dialog box.

Data source name

Connection pooling enabled

Shared logon username and

password

Maximum number of connections

Connection pool name

Call interface

5. Edit Connection Pool PropertiesAfter importing into the Physical layer, the next step is to set up, or check, the connection pool for the data source. The connection pool contains information about the connection between Oracle BI Server and that data source, for example, the connection pool name, the data source name that connects to the data source, username and password for the data source, and the maximum number of connections. The Physical layer in the Administration Tool contains at least one connection pool for each data source. When you create the Physical layer by importing a schema for a data source, the connection pool is created automatically. But you can configure multiple connection pools for a database. Click the General tab of the Connection Pool dialog box to create or edit a connection pool in the Physical layer. The recommendation is to give the connection pool a distinct name.

• Selecting the “Enable connection pooling” check box allows multiple concurrent query requests to share a single database connection. This reduces the overhead of connecting to a database because it does not open and close a new connection for every query. If you do not select this option, each query sent to the database opens a new connection.

• The Timeout value indicates how long a connection remains open for any future requests. For each connection pool, you must specify the maximum number of concurrent connections allowed. When this limit is reached, Oracle BI Server routes all other connection requests to another connection pool, or if no other connection pools exist, the connection request waits until a connection becomes available.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 92: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 26

Copyright © 2008, Oracle. All rights reserved.

6. Define Physical Keys and Joins

The Administration Tool allows you to define physical keys and joins that were not imported automatically.• Define keys using the Physical Table properties dialog box.• Define joins and keys using the Physical Diagram.

6. Define Physical Keys and JoinsThe Administration Tool allows you to define keys and joins using several different methods. You must define joins that exist on the physical database in the Physical layer of the repository. If the imported database joins over primary key–foreign key relationships and the primary keys and foreign keys are imported into the repository, the join conditions are set up automatically in the Physical layer of the repository. In the ABC example, primary keys, foreign keys, and joins have not been automatically defined in the repository, so they need to be defined manually.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 93: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 27

Copyright © 2008, Oracle. All rights reserved.

Defining Keys Using the Table Properties Dialog Box

Open the Physical Table properties dialog box to view or define keys.

Select the Keys tab.

Click New.

Check the appropriate check box to define the key.

Defining Keys Using the Table Properties Dialog BoxRight-click a table object and select Properties, or double-click the table object to open the Physical Table properties dialog box. The primary key is defined as a column or set of columns where each value is unique and identifies a single row of the table. You can view or specify both primary key and foreign keys in the Physical Diagram or by using the Keys tab and Foreign Keys tab of the Physical Table properties dialog box, which is illustrated in this slide.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 94: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 28

Copyright © 2008, Oracle. All rights reserved.

Using the Physical Diagram

Use the Physical Diagram to view or define keys and joins.

Double-click a link to open the Joins properties dialog

box.

Click the Physical Diagram icon ...

... or right-click the objects to open the Physical Diagram.

Using the Physical DiagramThe Physical Diagram graphically shows the physical tables and any defined joins between them. You can use the Physical Diagram to define primary keys, foreign keys, and joins between tables. As stated earlier, all valid physical joins need to be configured in the Physical layer of the Administration Tool. To open the Physical Diagram window, select one or more tables in the Physical layer and click the Physical Diagram icon on the toolbar or select one of the Physical Diagram options from the shortcut menu. The options are shown in the slide: Selected Object(s) Only, Object(s) and Direct Joins, and Object(s) and All Joins. You can view any joins that have already been created by double-clicking a join to open the Joins properties dialog box. You also can create new joins using the Join icons on the toolbar, shown in the next slide.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 95: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 29

Copyright © 2008, Oracle. All rights reserved.

Defining Foreign Key Joins

6. Join expression: first table selected maintains primary key; second table selected maintains foreign key to first table.

5. Select key columns.

1. Select New Foreign Key.

2. Select “one” table in relationship.

3. Select "many” table in relationship.

4. The Physical Foreign Key dialog box opens.

Defining Foreign Key JoinsThis slide describes the process for building a foreign key join in the Physical Diagram. To define a foreign key join:

1. Click the New Foreign Key icon on the Administration Tool toolbar. 2. With this icon selected, in the Physical Diagram, click the first table in the join (the table

representing “one” in the one-to-many join) to select it. 3. Place the cursor over the table to which you want to join (the table representing “many” in the

one-to-many join), and click the second table to select it. The order is important. The first table you click contains the primary key. The second table contains the foreign key that points to the primary key in the first table.

4. After you click the second table, the Physical Foreign Key dialog box appears. 5. Join the key column in the first table to a column that is the foreign key in the second table by

selecting the appropriate columns. By default, the left side is the “one” side and the right side is the “many.”

6. The SQL join condition appears in the expression pane of the window.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 96: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 30

Copyright © 2008, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to:• Identify and describe the objects in the Physical layer of a

repository• Create the Physical layer of a repository

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 97: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 31

Copyright © 2008, Oracle. All rights reserved.

Practice 2-1 Overview: ABC Business Scenario

This practice covers the ABC business scenario.

Practice 2-1 Overview: ABC Business ScenarioIn this practice, you read the ABC document to get acquainted with the business scenario for the fictitious company used.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 98: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 32

Copyright © 2008, Oracle. All rights reserved.

Practice 2-2 Overview: Gathering Informationto Build an Initial Business Model

This practice covers the following topics:• Gathering and analyzing the business requirements of the

ABC company • Determining the structure of the initial business model

Practice 2-2 Overview: Gathering Information to Build an Initial Business Model Before you can begin to build the metadata, you need to gather and analyze the business requirements of the ABC company. In this practice, you use the information provided in the ABC document that you read in the previous practice to determine the structure of the initial business model.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 99: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 33

Copyright © 2008, Oracle. All rights reserved.

Practice 2-3 Overview: Creating a Repositoryand Importing a Data Source

This practice covers the following topics:• Creating a new repository• Importing tables into the Physical layer of the repository

Practice 2-3 Overview: Creating a Repository and Importing a Data SourceIn the previous practice, you checked the connection to ABC’s SUPPLIER2 database schema by testing your connectivity using the ODBC Client Utility. Now you are ready to create a new repository and import tables from the SUPPLIER2 schema into the Physical layer of the repository using the Administration Tool.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 100: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 34

Copyright © 2008, Oracle. All rights reserved.

Practice 2-4 Overview: Defining Keys and Joins

This practice covers defining the primary keys, foreign keys, and joins in the Physical layer using the Administration Tool.

Practice 2-4 Overview: Defining Keys and JoinsIn the previous practice, you created a new repository and imported the initial tables from the SUPPLIER2 schema into the Physical layer of the repository. Now you must define keys and joins that exist on the physical database in the Physical Layer of the repository. If the imported database joined over primary key–foreign key relationships and the primary keys and foreign keys were imported into the repository, the join conditions would be set up automatically. But that is not always what you want, because foreign key relationships are set in a database for only one purpose (referential integrity), which may not correspond to the purpose of the Administration Tool (knowing which joins to include in SQL). In this database, primary keys, foreign keys, and joins have not been defined. Therefore, you need to define the keys and join conditions manually using an object’s Properties dialog box and the Physical Diagram feature of the Server Administration Tool.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 101: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 2 - 35

Copyright © 2008, Oracle. All rights reserved.

Practice 2-5 Overview: Creating Alias and Select Tables

This practice covers the following topics:• Creating an alias table• Creating a select table• Deploying a view

Practice 2-5 Overview: Creating Alias and Select TablesABC wants to view data by order date and specific regions. You create an Order Date alias that points to the D1_CALENDAR2 table, and a RegionEast select table. Later, when you configure the business model and presentation layer, you make this metadata available to users for queries in Oracle BI Answers. You also practice deploying and undeploying a view and checking the results.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 102: Student Guide OBIEE 1

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 103: Student Guide OBIEE 1

Copyright © 2008, Oracle. All rights reserved.

Building the Business Model and Mapping Layer of a Repository

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 104: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 2

Copyright © 2008, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to:• Identify the objects in the Business Model and Mapping

(BMM) layer of a repository• Build a business model • Create measures in a business model

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 105: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 3

Copyright © 2008, Oracle. All rights reserved.

Business Model and Mapping (BMM) Layer

The BMM layer is where physical schemas are simplified and reorganized to form the basis of the users’ view of the data.

Business Model and Mapping LayerThe BMM layer of the Administration Tool defines the business (or logical) models of the data and specifies the mapping between the business models and the Physical layer schemas. This is where the physical schemas are simplified to form the basis for the users’ view of the data. The Business Model and Mapping layer of the Administration Tool can contain one or more business model objects. A business model object contains the business model definitions and the mappings from logical to physical tables for the business model.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 106: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 4

Copyright © 2008, Oracle. All rights reserved.

Business Model and Mapping Layer Objects

The Business Model and Mapping layer contains business model objects.

Business model

Logical dimension tables

Logical table source

Logical columns

Logical fact table

Measures

Dimension hierarchies

Business Model and Mapping Layer ObjectsThe BMM layer contains business model objects. There can be multiple business models in this layer, although there is only one, SupplierSales, in this example. The business model object is the highest-level object, and it contains logical tables: Customers, Periods, Products, and SalesFacts in this example. Logical tables contain logical columns. Logical tables also have a Sources folder that contains one or more logical table sources. These logical table sources define the mappings between the logical table and the physical tables where the data is actually stored. In this example, the data for the SalesFacts logical table is stored in the D1_ORDERS2 physical table. The logical table source has been renamed Orders.In the BMM layer, data is separated and simplified into facts and dimensions. Recall that facts contain the business measures, and dimensions contain descriptive attributes that qualify the facts. Each business model contains one or more dimension tables and fact tables. A dimension table appears with a white table icon. A fact table is displayed with a yellow icon. The business model also contains dimension hierarchies (for example: CustomersDim, PeriodsDim, and ProductsDim). Dimension hierarchies introduce formal hierarchies into a business model, establish levels for data groupings and calculations, and provide paths for drill down in clients like Oracle BI Answers. Dimension hierarchies are discussed in the lesson titled “Creating Dimension Hierarchies and Level-Based Measures.”

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 107: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 5

Copyright © 2008, Oracle. All rights reserved.

Business Model Mappings

• BMM layer objects map to source data objects in the Physical layer.

• Mappings are typically not one-to-one:– Business models may map to multiple data sources.– Logical tables may map to multiple physical tables.– Logical columns may map to multiple physical columns.

Mappings

Business Model MappingsBusiness model objects map to the source data objects in the Physical layer. Business models map to physical schemas, logical tables map to physical tables, logical columns map to physical columns, and so on. The arrows convey the mappings. To automatically map objects in the BMM layer to sources in the Physical layer, you can drag Physical layer objects to a business model in the logical layer.There is no one-to-one mapping between business model objects and physical objects. In fact, a business model can have multiple data sources, a logical table can have multiple physical tables as sources, and a logical column can have multiple physical columns as sources. In the Administration Tool, the mappings are specified in the logical BMM layer, and not in the Physical layer. The mappings can include transformations and formulas. You use the BMM layer to define the meaning and content of each physical source in business model terms. Oracle BI Server then uses these business model definitions to pick the appropriate sources for each data request.Also note that, in this example, the business model object names have been changed. For example, the name of the logical table that maps to the D1_CUSTOMER2 physical table has been changed to Customers. You can change the names of business model objects independently from corresponding physical model object names and properties, and vice versa. The tool keeps track of the changes.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 108: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 6

Copyright © 2008, Oracle. All rights reserved.

Business Model and Mapping Layer Objects

• Business model• Logical tables • Logical table sources• Logical columns• Logical primary keys• Logical joins• Logical complex join• Measures

Business Model and Mapping Layer ObjectsThis slide identifies the BMM layer objects. Details for each follow in the subsequent slides.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 109: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 7

Copyright © 2008, Oracle. All rights reserved.

Business Model

• Is the highest-level object in the BMM layer• Contains the business model definitions and the mappings

from logical to physical tables• Simplifies the physical schema• Captures how users think about their businesses using their

own vocabulary

Business model

Familiar business vocabulary

Business Model ObjectThe business model object is the highest-level object in the BMM layer. The BMM layer of the Administration Tool must contain at least one business model. A business model object contains the business model definitions and the mappings from logical to physical tables for the business model. SupplierSales is the business model object in this example.The main purpose of the business model is to capture how users think about their businesses using their own vocabulary. The business model simplifies the physical schema and maps the users’ business vocabulary to physical sources. Most of the vocabulary translates into logical columns in the business model.You can create a business model automatically by dragging a schema from the Physical layer. You can create a business model manually by right-clicking in the white space in the BMM layer and selecting New Business Model.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 110: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 8

Copyright © 2008, Oracle. All rights reserved.

Logical Tables

• Represent fact or dimension data• Can be created:

– Automatically by dragging tables from Physical layer– Manually by right-clicking business model and selecting New

Object > Logical Table• Can be modified without affecting Physical layer objects

Logical dimension tables (white icon)

Logical fact table (yellow icon)

Logical TablesLogical tables exist in the BMM layer and represent fact or dimension data. Logical fact tables have a yellow icon; logical dimension tables have a white icon. The logical schema defined in each business model needs to contain at least two logical tables and you need to define relationships between them.Typically, you create logical tables by dragging a physical table from the Physical layer to a business model in the BMM layer. If a table does not exist in your physical schema, you can create the logical table manually by right-clicking the business model object and selecting New Object > Logical Table. A drag operation is usually the fastest method for creating objects in the BMM layer. If you drag physical tables from the Physical layer to the BMM layer, the columns belonging to the table are also copied. After you drag objects into the BMM layer, you can modify them without affecting the objects in the Physical layer. For example, you can change the logical table name, reorder tables and columns, and so on.When you drag physical tables (with key and foreign key relationships defined) to a business model, logical keys and joins are created that mirror the keys and joins in the physical layer. This occurs only if the tables that you drag include the table with the foreign keys. Additionally, if you create new tables or subsequently drag additional tables from the Physical layer to the BMM layer, the logical links between the new or newly dragged tables and the previously dragged tables must be created manually.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 111: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 9

Copyright © 2008, Oracle. All rights reserved.

Logical Table Sources

Define the mappings from a logical table to a physical table• Logical tables may have multiple logical table sources.• One logical table source may map to many physical sources.

Logical Table SourcesLogical table sources define the mappings from a logical table to a physical table. A logical table’s Sources folder contains the logical table sources. Logical tables can, and routinely do, have many physical table sources. For example, revenue information may come from multiple data sources in a business. You might have three different business units (each with its own order system) where you get revenue information. In another example, you might periodically summarize revenue from an orders system or a financial system and use this aggregate table for high-level reporting. In this example, D1_ORDERS2 is the only logical table source for the SalesFacts table in the SupplierSales business model.When you create logical tables and columns by dragging from the Physical layer, the logical table sources are generated automatically. To create a logical table source manually, right-click a logical table and select New Object > Logical Table Source.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 112: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 10

Copyright © 2008, Oracle. All rights reserved.

Logical Table Source: Column Mappings

Click the Column Mapping tab in the Logical Table Source dialog box to build, view, or modify logical to physical column mappings.

Double-click the logical table source to open dialog box.

Build, view, or modify mappings

Column MappingsClick the Column Mapping tab in the Logical Table Source dialog box to build, view, or modify logical to physical column mappings. A mapping can also be used to specify transformations that occur between the Physical layer and the BMM layer. The transformations can be simple, such as changing an integer data type to a character type, or more complex, such as applying a formula to find a percentage of sales per unit of population. Within a single logical table source, a logical column can be mapped only to one physical column in one physical table. With multiple logical table sources, it is possible to map a logical column to multiple physical columns in multiple physical tables.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 113: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 11

Copyright © 2008, Oracle. All rights reserved.

Logical Columns

Represent the business view of the data• May map to many columns in the Physical layer• May be defined by other logical columns• Can be created:

– Automatically by dragging tables or columns from the Physical layer

– Manually by right-clicking a logical table and selecting New Object > Logical Column

Logical columnsLogical key column

Logical ColumnsLogical columns are created automatically by dragging tables from the Physical layer to the BMM layer. Other logical columns, especially ones that involve calculations based on other logical columns, can be created manually. To create a logical column manually, right-click a logical table and select New Object > Logical Column. A single logical column may map to many physical columns in the Physical layer. For example, a logical column might map to both a physical column in a detail table and a physical column in an aggregate table. Oracle BI Server decides which table and column to use based on repository configuration and the query request. Logical columns may also be defined by other logical columns. For example, a logical column may use an existing logical column in an expression or calculation.Logical columns are displayed in a tree structure expanded from the logical table to which they belong. If the column is a primary key column or participates in a primary key, the column is displayed with the key icon. Logical columns can be renamed and reordered without impacting the columns in the Physical layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 114: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 12

Copyright © 2008, Oracle. All rights reserved.

Logical Primary Keys

• Define unique identifiers for logical tables• Define the lowest level of detail of a logical table• Are required for each logical dimension table for a valid

repository

Logical primary key (key icon)

Logical Primary KeysLogical primary keys define unique identifiers for logical tables. For a business model to be valid, each logical dimension table must have a logical primary key. Logical fact tables do not require keys for a business model to be valid. Logical primary keys can consist of one or more logical columns. The logical key defines the lowest level (the most detailed level) of information of any source in the logical table. After creating tables in the BMM layer, you can manually specify a primary key for each table by right-clicking the table and selecting New Object > Logical Key, or double-clicking a table and clicking the Key tab.You can also define logical keys during the process of defining logical joins, which is discussed in the next slide. Logical primary key columns are denoted by the key icon.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 115: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 13

Copyright © 2008, Oracle. All rights reserved.

Logical Joins

• Express the cardinality relationship between logical tables and are required for a valid business model

• Help Oracle BI Server understand the relationships between various objects of the business model

– Examining logical joins is an integral part of how Oracle BI Server figures out how to construct the physical queries.

Create complex joins.

Fact table at “many” end of logical joinLogical Table Diagram

Logical JoinsLogical joins express the cardinality relationships between logical tables and are a requirement for a valid business model. Specifying the logical table joins is required so that Oracle BI Server can have the necessary metadata to translate logical requests against the business model into SQL queries against the physical data sources. Logical joins help Oracle BI Server understand the relationships between the various pieces of the business model. When a query is sent to Oracle BI Server, the server figures out how to construct physical queries by examining how the logical model is structured. Examining logical joins is an integral part of this process. The Administration Tool considers a table to be a logical fact table if it is at the “many” end of all logical joins that connect it to other logical tables. Typically, you use the Logical Table Diagram to build logical joins. The method is similar to building physical joins using the Physical Diagram in the Physical layer. It is also possible to construct joins using the Joins Manager, which is discussed in more detail in the lesson titled “Using Administration Tool Utilities.”

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 116: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 14

Copyright © 2008, Oracle. All rights reserved.

Logical Complex Join

• Is used to define join relationships in the BMM layer• Allows Oracle BI Server to make the best decision about the

exact physical SQL to generate based on the logical query path

Double-click to view join

characteristics.

Complex join has no key relationship defined and no expression.

Logical Complex JoinLogical complex joins are used to define join relationships in the BMM layer. A complex join tells Oracle BI Server that it can make the best decision about what exact Physical SQL to generate based on a logical query request. This is in contrast to a foreign key join in the BMM layer, which forces the server to use only that single physical join path between the two tables, even when a different path would be far more efficient. In the BMM layer, you should create complex joins with one-to-many relationships and not logical foreign key joins. The capability to create logical foreign key joins in the BMM layer is in the Administration Tool to provide backward compatibility with previous releases of the product. In some cases, logical foreign key joins are needed if Oracle BI Server is used as an Open Database Connectivity (ODBC) data source for certain third-party query and reporting tools. Note that there is no expression in a complex join and no key relationship is explicitly declared.Logical joins are automatically created if both of the following statements are true:

• You create the logical tables by simultaneously dragging all required physical tables to the BMM layer.

• The logical joins are the same as the joins in the Physical layer. However, you will probably have to create some logical joins manually in the BMM layer because you rarely drag all physical tables simultaneously except in very simple models. The method for viewing join relationships in the BMM layer is similar to that used in the Physical layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 117: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 15

Copyright © 2008, Oracle. All rights reserved.

Measures

• Are the facts a business uses to evaluate its performance• Are calculations that define measurable quantities • Are created on logical columns in the fact table• Have a defined aggregation rule

Summation icon denotes an aggregation rule.

MeasuresMeasures are the facts a business uses to evaluate its performance. In a business model, some logical columns serve as measures. Measures need to be computed correctly from the base physical data when Oracle BI Server receives a query from a client. In this case, we want Dollars, Units Shipped, Units Ordered, and Net Weight Shipped to be aggregated by summing. The third bullet refers to setting aggregation on a column. By default, a column has no aggregation rule defined (rule = None). When you define an aggregation rule on a column, the icon changes to reflect this. After you define an aggregation rule on a column, the aggregation is the default. In the screenshot, the sum aggregation rule has been defined for the Dollars, Units Shipped, Units Ordered, and New Weight Shipped columns. The calculations are sent to the database or processed by Oracle BI Server. Measures may not require any calculations. For example, they might be a “regular” logical column and simply return the data from the source. Measures can also use other logical columns in calculations and formulas.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 118: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 16

Copyright © 2008, Oracle. All rights reserved.

ABC Example

Create a dimensional model to represent ABC’s business.• Periods, Products, and Customers are logical dimensions.• SalesFacts is the central fact table containing total sales,

units ordered, and units shipped.

Customers

Region

District

Sales Rep

Customer

Products

Type

Subtype

Description

Price

SalesFacts

Dollars

Units Ordered

Units Shipped

Periods

Year

Quarter

Month

Day

ABC ExampleIn the previous lesson, you identified the source of the information needed to create the ABC business model and imported tables and columns into the Physical layer. Now you use the BMM layer of the repository to construct the business model for the information ABC wants to analyze. This model should represent the logical-to-physical mapping of order, period, product, and customer data to support the dimensional model. In this lesson, you arrange ABC’s data so that it makes sense for answering business questions about performance measurements, such as total sales dollars, units ordered, and units shipped. You use an iterative approach to building the business model by starting small with simple aggregation rules and enhancing the model later.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 119: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 17

Copyright © 2008, Oracle. All rights reserved.

Implementation Steps

1. Create the logical business model.2. Create the logical tables and columns.3. Define the logical joins.4. Modify the logical tables and columns.5. Define the measures.

Implementation StepsAt a high level, these are the steps to build a business model in the BMM layer. Each step is covered in detail in the slides that follow.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 120: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 18

Copyright © 2008, Oracle. All rights reserved.

1. Create the Logical Business Model

Right-click in the BMM layer and select New Business Model.

1. Create the Logical Business ModelThere are two ways to create the logical business model. You can create the business model manually, or drag a data source from the Physical layer. This slide identifies the manual method. Right-click in the white space of the Business Model and Mapping (BMM) layer below any existing objects and select the New Business Model option. Specify a name for the business model. The alternate method is to drag the SUPPLIER2 schema from the Physical layer into the BMM layer and then rename the business model SupplierSales in the BMM layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 121: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 19

Copyright © 2008, Oracle. All rights reserved.

2. Create the Logical Tables and Columns

Drag physical table objects from the Physical layer into the business model or right-click the business model and select New Object > Logical Table.

Model is not yet available for queries.

Logical table sources map to physical

tables.

Keys automatically created if defined in

Physical layer

Sources folder identifies logical table sources.

Logical columns map to physical columns.

2. Create the Logical Tables and ColumnsTypically, you create logical tables by dragging physical tables from the Physical layer to a business model in the Business Model and Mapping layer. Logical tables and columns can also be created manually in the Business Model and Mapping layer by right-clicking the business model and selecting New Object > Logical Table. Drag operations are usually the fastest method for creating objects in the Business Model and Mapping layer. When you drag physical tables from the Physical layer to the Business Model and Mapping layer, the columns belonging to the table are also copied. The red symbol on the business model folder indicates that it is not enabled for querying. By default, when you create a new business model, it is disabled for querying. After a business model is valid and consistent you can enable it for querying. You learn more about checking business model consistency in the lesson titled “Testing and Validating a Repository.”Note that this is an example of a simple business model. A common mistake is not using the Business Model and Mapping layer to simplify the physical data model. There should be no 1:1 correspondence between physical fact and dimension tables in the physical layer and logical fact and dimension tables in the Business Model and Mapping layer. When possible, multiple dimensional tables that reference the same class of attributes should be collapsed into a single logical table source. Similarly, when possible, multiple fact tables that contain related measures should be collapsed into a single logical table source.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 122: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 20

Copyright © 2008, Oracle. All rights reserved.

3. Define the Logical Joins

Define logical table joins in the Business Model and Mapping layer using techniques similar to those used in the Physical layer.

Right-click the object and select Business Model Diagram.

…to create logical joins.

Use the New Complex Join button…

3. Define the Logical JoinsThis slide illustrates the steps for defining logical joins in the Business Model and Mapping layer. The steps are similar to those used to define joins in the Physical layer. The differences are that you use the Logical Table Diagram instead of the Physical Diagram, and complex joins instead of foreign key joins.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 123: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 21

Copyright © 2008, Oracle. All rights reserved.

4. Modify the Logical Tables and Columns

Use an object’s properties window or the user interface (UI) to:• Rename tables and columns• Reorder tables and columns• Add or delete tables and columns• Add or delete sources• Cut, copy, and paste objects

Rename or reorder columns.

Rename or reorder tables.

Delete unnecessary columns.

4. Modify the Logical Tables and ColumnsAfter you have created objects in the Business Model and Mapping layer, there are a number of ways to modify the objects. Double-click an object to open the Properties window for the object. Depending on what object you are modifying, you can rename the object, reorder columns in the table, add or delete columns, add or delete physical sources, and add or delete primary and foreign keys. You can also perform many of the same tasks by right-clicking a table object. Plus, you can perform additional tasks such as copying and pasting objects, duplicating objects, and so on. You can change the names of business model objects independently from corresponding physical model object names, and vice versa. The tool tracks the changes.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 124: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 22

Copyright © 2008, Oracle. All rights reserved.

5. Define the Measures

Right-click the logical column and select Properties > Aggregation.

Right-click and select Properties.

Specify aggregation rule.

Icon indicates aggregation rule.

5. Define the MeasuresA critical step in setting up your business model is configuring your business measures. One method is to specify aggregation rules for mapped logical columns that are measures. Aggregation should only be performed on measure columns. Measure columns should exist only in logical fact tables. To specify a default aggregation rule for a measure column, perform the following steps:

• In the Business Model and Mapping layer, double-click a logical column, or right-click and select Properties to open the Properties window.

• In the Logical Column dialog box, click the Aggregation tab.• In the Aggregation tab, select one of the aggregate functions from the “Default aggregation rule”

drop-down list. The function you select is always applied when an end user or an application requests the column in a query.

In this example, you are summing the Dollars column in the SalesFacts table. If a user requests dollars by customers in Oracle BI Answers, the results will display the SUM, total dollars, for each customer based on records in the SalesFacts table.It is possible to select multiple columns simultaneously and apply the same aggregation rule to them.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 125: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 23

Copyright © 2008, Oracle. All rights reserved.

Best Practices

• Use only logical (not foreign key) joins in the Business Model and Mapping layer.

• Rename logical columns.– Use names acceptable to the organization and understood by

users.– Use short names to minimize space on reports.– Create unique names for all columns.– Avoid using the same name as a logical table or business

model.• Do not delete logical columns that define the contents of

logical table sources.

Best PracticesUsing logical joins in the Business Model and Mapping layer allows Oracle BI Server to select how to do the join. If you have aggregates, or multiple ways to join to different levels in a hierarchy, a logical foreign key join does not allow the server to select. Foreign key joins should be used in the Physical layer (unless the join is more complicated than a simple foreign key join, such as containing an expression or function) and complex joins should be used in the Business Model and Mapping layer.Some columns can be deleted in the Business Model and Mapping layer. For example, logical fact table keys that were created by dragging a fact table from the Physical layer. However, be careful not to delete any columns that are used to define the contents of logical table sources.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 126: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 24

Copyright © 2008, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to:• Identify the objects of the Business Model and Mapping layer

of a repository• Build the business model• Create simple measures

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 127: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 25

Copyright © 2008, Oracle. All rights reserved.

Practice 3-1 Overview: Creating the Business Model

This practice covers the following topics:• Creating a business model• Creating logical tables• Creating logical keys and logical joins• Renaming and reordering logical objects• Deleting unnecessary logical objects

Practice 3-1 Overview: Creating the Business ModelIn the previous set of practices, you created the physical layer of the repository. You are now ready to begin building the business model in the Business Model and Mapping layer of the repository. The main purpose of the business model is to capture how users think about their businesses using their own vocabulary.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 128: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 3 - 26

Copyright © 2008, Oracle. All rights reserved.

Practice 3-2 Overview: Creating Simple Measures

This practice covers the following topics:• Examining logical-to-physical column mappings• Creating simple measures

Practice 3-2 Overview: Creating Simple MeasuresThe SupplierSales business model is now defined in the Business Model and Mapping layer. In this practice, you review the logical-to-physical table and column mappings to better understand the relationships that exist between logical tables and their logical table sources. You then create measures by setting aggregation rules for logical columns. Then you check the physical tables referenced by the business model.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 129: Student Guide OBIEE 1

Copyright © 2008, Oracle. All rights reserved.

Building the Presentation Layer of a Repository

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 130: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 2

Copyright © 2008, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to:• Identify the objects of the Presentation layer of a repository• Modify the properties of the Presentation layer objects• Build the Presentation layer of a repository

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 131: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 3

Copyright © 2008, Oracle. All rights reserved.

Presentation Layer

• Provides a way to present a customized view of a business model to users

• Exposes only the data meaningful to the users• Organizes the data in a way that aligns with the way users

think about the data• Renames data as necessary for the set of users

Presentation LayerThe Presentation layer is built after the Physical layer and the Business Model and Mapping layer and adds a level of abstraction over the Business Model and Mapping layer. It is the view of the data seen by end users. The Presentation layer provides a means to further simplify or customize the Business Model and Mapping layer for users. For example, you can hide key columns or reorganize the data into catalogs and folders. Simplifying the view of the data for users makes it easier to craft queries based on their business needs. The Presentation layer:

• Exposes only the data meaningful to the users• Organizes the data in a way that aligns with the way users think about the data• Renames data as necessary for the set of users

You can create Presentation layer objects by dragging objects from the Business Model and Mapping (BMM) layer. Corresponding objects are automatically created in the Presentation layer. You can also create Presentation layer objects manually.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 132: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 4

Copyright © 2008, Oracle. All rights reserved.

Presentation Catalogs

Organize and simplify the business model for a set of users• Single catalog must be populated with content from a single

business model; cannot span business models.• Multiple catalogs can reference the same business model.

Catalog for user group 1

Catalog for user group 2 Both catalogs reference

the same business model.

Presentation CatalogsPresentation catalogs allow you to show different views of a business model to different sets of users. Presentation catalogs have to be populated with contents from a single business model. They cannot span business models. However, multiple presentation catalogs can refer to the same business model. The screenshot shows two different presentation catalogs that refer to the same underlying business model. If there are different user bases, you can create different catalogs to meet the needs.Creating a Presentation CatalogThere are several ways to create a presentation catalog in the Presentation layer. The recommended method is to drag a business model from the Business Model and Mapping (BMM) layer to the Presentation layer. With this method, logical tables and columns automatically become presentation tables and columns. You can also right-click in the Presentation layer and select New Presentation Catalog. You can then modify the Presentation layer based on how you want to organize the information for users. In the Presentation layer, presentation catalogs are seen as subject areas by Answers users.Modifying Presentation Tables in a Presentation CatalogPresentation catalogs contain presentation tables. Click the Presentation Tables tab in the Presentation Catalog properties dialog box to reorder, sort, or delete Presentation layer tables. You can also use this tab to access the Presentation Table dialog box, where you can create and edit tables. Changes to the Presentation layer do not impact corresponding objects in the BMM layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 133: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 5

Copyright © 2008, Oracle. All rights reserved.

Presentation Tables

• Organize presentation columns into categories that make sense to the users

• May contain columns from one or more logical tables• Can be modified independently of logical tables• Can be created:

– Automatically by dragging logical tables from BMM layer– Manually in the Presentation layer

Presentation tables

Presentation TablesUse presentation tables to organize columns into categories that make sense to the users. Presentation tables contain presentation columns. A presentation table can contain columns from one or more logical tables. The names and object properties of the presentation tables are independent of the logical table properties.Creating a Presentation TableThere are several ways to create a presentation table in the Presentation layer. Presentation tables are created automatically when you drag a business model to the Presentation layer to create a presentation catalog. Another method is to drag a logical table from the Business Model and Mapping layer to an existing presentation catalog in the Presentation layer. You can also right-click a presentation catalog and select New Presentation Table. You can use presentation tables to modify the Presentation layer based on how you want to organize the information for users. Presentation tables in the Presentation layer are seen as folders by users of Oracle BI Answers.Modifying Presentation Columns in a Presentation TablePresentation tables contain presentation columns. Use the Columns tab in the Presentation Table properties dialog box to reorder, sort, or delete Presentation layer columns. You can also use this tab to access the Presentation Column dialog box, where you can create and edit columns.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 134: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 6

Copyright © 2008, Oracle. All rights reserved.

Presentation Columns

• Define the columns used to build queries in the Oracle BI user interface

• Map to logical columns in the BMM layer• Can be created:

– Automatically by dragging logical tables or columns from the BMM layer

– Manually in the Presentation layer

Presentation columns

Presentation ColumnsPresentation columns define the columns used to build queries in the Oracle BI user interface. The presentation column names are, by default, identical to the logical column names in the Business Model and Mapping layer. To provide a convenient organization for your end users, you can drag a column from a single logical table in the Business Model and Mapping layer to multiple presentation tables. This allows you to create categories that make sense to the users. For example, you can create several presentation tables that contain different classes of measures—one containing volume measures, another containing share measures, yet another containing measures from a year ago, and so on. Creating a Presentation ColumnThere are several ways to create a presentation column in the Presentation layer. Presentation columns are created automatically when you drag a logical table to the Presentation layer to create a presentation table. Another method is to drag a logical column from the Business Model and Mapping layer to a presentation table in the Presentation layer. You can also right-click a presentation table and select New Presentation Column. Presentation columns in the Presentation layer are seen as columns by users of Oracle BI Answers.Modifying Presentation ColumnsDouble-click a presentation column to open the Presentation Column dialog box.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 135: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 7

Copyright © 2008, Oracle. All rights reserved.

Presentation Layer Mappings

Presentation layer objects map to objects in the Business Model and Mapping layer.

Presentation catalogs map to the business

model.

Presentation tables may map to logical tables.

Presentation columns map to logical columns.

Presentation Layer MappingsPresentation layer objects map to objects in the Business Model and Mapping layer. Presentation catalogs map to business models, presentation tables may map to logical tables, and presentation columns map to logical columns. A presentation catalog can map to only a single business model and cannot span multiple business models. However, multiple presentation catalogs can reference the same business model and a presentation table can contain columns from one or more logical tables. Thus, you can use presentation catalogs and tables to organize columns into categories that make sense to the users. Presentation tables do not necessarily have a one-to-one mapping to a logical table. Presentation tables are folders used for organizing columns and can be organized and structured differently from logical tables in the Business Model and Mapping layer.When objects are dragged from the Business Model and Mapping layer, the presentation catalog, table, and column names are, by default, identical to the logical names in the Business Model and Mapping layer, but can be renamed. The names and object properties of the presentation tables are independent of the logical table properties. Note that these are just examples and that presentation objects do not have to exactly mirror business model logical objects as the example in the slide implies.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 136: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 8

Copyright © 2008, Oracle. All rights reserved.

Defining User Interface in the Presentation Layer

Presentation layer objects define the interface that users see to query the data from the data sources.

Presentation folder

Presentationcolumn

Presentation catalog Subject area

Folder

Column

Defining User Interface in the Presentation LayerPresentation layer objects define the interface that users see to query the data from the data sources. Presentation catalogs in the Presentation layer appear as subject areas in Oracle BI Answers. Presentation tables in the Presentation layer appear as folders in Oracle BI Answers. Presentation columns appear as columns in Oracle BI Answers folders.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 137: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 9

Copyright © 2008, Oracle. All rights reserved.

Nested Presentation Tables

Give the appearance of nested folders in Oracle BI Answers• Prefix the name of the presentation folder to be nested with

a hyphen and a space.• Place it after the folder in which it nests.

SalesFacts nested under Facts Hyphen and space omitted in Answers

Nested Presentation TablesTo give the appearance of nested folders in Oracle BI Answers, prefix the name of the presentation folder to be nested with a hyphen and a space and place it after the folder in which it nests. Alternatively, you can enter a hyphen and a greater than sign in the Description field. For example, to nest the SalesFacts folder in the Facts folder, place the SalesFacts folder directly after Facts in the Presentation layer and rename it “- SalesFacts.” When Answers displays the folder, it omits the hyphen and space from the folder name. It is possible to nest multiple folders under a single folder; however, only one level of nesting is possible.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 138: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 10

Copyright © 2008, Oracle. All rights reserved.

Aliases

Keep track of any changes to Presentation layer objects

Prior namesAdd or delete

aliases.

AliasesAn Aliases tab appears on the Presentation Catalog, Presentation Table, and Presentation Column property dialog boxes. If you modify a Presentation layer object, this tab keeps track of any prior names. Aliases are used to maintain compatibility with previously written queries after an object has been modified. You also can use this tab to specify or delete an alias for the Presentation layer objects.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 139: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 11

Copyright © 2008, Oracle. All rights reserved.

ABC Example

Build the Presentation layer to present users with a customized view of ABC’s data.

ABC ExampleIn the previous lesson, you built the business model for the information that ABC wants to analyze in the Business Model and Mapping layer of the repository. In this lesson, you need to arrange ABC’s data in the Presentation layer to present a customized view of the data to users. As the model evolves throughout the course, so does this layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 140: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 12

Copyright © 2008, Oracle. All rights reserved.

Implementation Steps

1. Create a new presentation catalog.2. Rename tables.3. Reorder tables.4. Delete columns.5. Rename columns.6. Reorder columns.

Implementation StepsAt a high level, these are the steps to build the Presentation layer. Each step is covered in detail in the following slides.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 141: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 13

Copyright © 2008, Oracle. All rights reserved.

1. Create a New Presentation Catalog

Drag the SupplierSales business model from the Business Model and Mapping layer to the Presentation layer to automatically create Presentation layer objects.

Business model becomes presentation catalog.

Logical tables become presentation tables.

Logical columns become presentation columns.

1. Create a New Presentation CatalogDrag the SupplierSales business model from the Business Model and Mapping layer to the Presentation layer. Dragging automatically creates a new presentation catalog with presentation tables and columns.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 142: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 14

Copyright © 2008, Oracle. All rights reserved.

2. Rename Tables

There are a few methods for renaming tables in the Presentation layer:• Use the General tab in the properties dialog box.• Right-click a table and select Rename.• Double-click a table slowly to make the name editable and

then enter a new name.

Use the General tab.

Double-click.

Rename.

2. Rename TablesThere are a few methods for renaming tables in the Presentation layer:

• Double-click the table and click the General tab.• Right-click the table in the Presentation layer and select Rename.• Slowly double-click the table in the Presentation layer to make it editable and then enter the new

name. Best practice is to rename objects in the Business Model and Mapping layer and to minimize renaming in the Presentation layer. However, if terminology is different between user groups who use the same business model, it may make sense to rename objects in the Presentation layer so that each user group is presented with a familiar name.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 143: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 15

Copyright © 2008, Oracle. All rights reserved.

3. Reorder Tables

To reorder tables, open the Presentation Catalog properties box and use the Up and Down buttons, or drag.

Double-click.

3. Reorder TablesTo reorder tables in the Presentation layer, double-click the presentation catalog to open the Presentation Catalog dialog box and click the Presentation Tables tab. Use the Up and Down arrows or drag to rearrange the tables.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 144: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 16

Copyright © 2008, Oracle. All rights reserved.

4. Delete Columns

Delete unnecessary columns to simplify the content and make it more understandable to users.

Double-click.

Select columns.

Remove.

4. Delete ColumnsTo delete columns in a presentation table, double-click the presentation table and click the Columns tab. Select the columns you want to delete and click the Remove button. You can also delete presentation columns by right-clicking the column in the Presentation layer and selecting Delete.You delete columns because you may not want to expose all the logical columns of a business model in a presentation catalog. For example, key columns are often created just to handle load processing and so on; typically they are not useful and can be deleted unless they have an intrinsic meaning, such as a date key. You can delete columns from the Presentation layer safely without affecting the existence of the logical column in the Business Model and Mapping layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 145: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 17

Copyright © 2008, Oracle. All rights reserved.

5. Rename Columns

• Presentation columns use the logical column name by default.

• Use the General tab in the column properties dialog box to deselect the Use Logical Column Name check box and enter custom name.

Use the General tab.

Custom name

Deselect to create a custom name.

5. Rename ColumnsTo rename a column in the Presentation layer, double-click the column and select the General tab. Deselect the “Use Logical Column name” check box and enter the new name in the Name field. Again, best practice is to rename objects in the Business Model and Mapping layer and to minimize renaming in the Presentation layer. However, if terminology is different between user groups who use the same business model, it may make sense to rename objects in the Presentation layer so that each user group is presented with a familiar name. You can rename a column in the Presentation layer safely without affecting the logical column name in the Business Model and Mapping layer. Presentation columns are automatically renamed when the corresponding logical object is renamed.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 146: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 18

Copyright © 2008, Oracle. All rights reserved.

6. Reorder Columns

To reorder columns, open the Presentation Table properties box and use the Up and Down buttons, or drag.

Select and move a column or group of columns.

6. Reorder ColumnsTo reorder columns in the Presentation layer, double-click the presentation table to open the Presentation Table dialog box and click the Columns tab. Use the Up and Down arrows or drag to rearrange the columns.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 147: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 19

Copyright © 2008, Oracle. All rights reserved.

Considerations

• Presentation catalogs can map to only one business model.• Multiple presentation catalogs can map to the same

business model.• Presentation columns can come from multiple logical tables

in a business model.• Presentation columns are automatically renamed when the

corresponding logical object is renamed.• Presentation tables cannot have the same name as the

presentation catalogs.• Presentation objects can be modified or deleted without

affecting corresponding logical objects.

ConsiderationsPresentation catalogs can map to only one business model, but multiple presentation catalogs can map to the same business model. Presentation columns can come from multiple logical tables in a business model. By default, a presentation column uses the same name as its corresponding logical column in the Business Model and Mapping layer. If you rename a column in the Business Model and Mapping layer, corresponding presentation columns are automatically renamed wherever they appear in the Presentation layer. The reverse is not true. Renaming a presentation object does not affect the corresponding logical object in the Business Model and Mapping layer. However, the repository stores an alias for the object using the previous name.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 148: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 20

Copyright © 2008, Oracle. All rights reserved.

Best Practices

• Use meaningful names.• Names cannot contain single quotation marks (‘); the

Administration Tool prevents it.• Use of double quotation marks (“) is permitted but should be

avoided.• Keep presentation object names unique:

– Naming presentation columns the same as presentation tables can lead to inaccurate results.

– Uniqueness allows SQL statements to be shorter because qualifiers are unnecessary.

• Group objects in meaningful ways.• Eliminate unnecessary objects to reduce confusion.• Use object description fields to convey information to users.• Keep names short to save space on reports.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 149: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 21

Copyright © 2008, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to:• Identify the objects of the Presentation layer of a repository• Modify the properties of the Presentation layer objects• Build the Presentation layer of a repository

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 150: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 4 - 22

Copyright © 2008, Oracle. All rights reserved.

Practice 4-1 Overview: Creating the Presentation Layer

This practice covers the following topics:• Creating Presentation layer objects• Customizing Presentation layer objects

Practice 4-1 Overview: Creating the Presentation LayerYou have created the initial SupplierSales business model in the repository. You now create the Presentation layer of the repository, which allows you to expose the business model to users in Oracle Answers so that users can build requests to analyze their data.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 151: Student Guide OBIEE 1

Copyright © 2008, Oracle. All rights reserved.

Testing and Validating a Repository

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 152: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 2

Copyright © 2008, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to execute the steps to test and validate a repository.

ObjectivesYou can help ensure implementation success by testing and validating a repository before making it available to users.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 153: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 3

Copyright © 2008, Oracle. All rights reserved.

Validating a Repository

The following steps validate whether a repository is constructedcorrectly and whether it yields the expected query results:• Checking repository for consistency• Enabling logging • Loading a repository• Checking a repository using Oracle BI Answers• Inspecting the query log

Validating a RepositoryValidating a repository involves several steps that check whether a repository is constructed correctly and whether it yields the expected results when queries are executed in Oracle Business Intelligence (BI) end-user applications, such as Answers. At a high level, the steps include:

• Checking a repository for consistency• Enabling logging• Loading a repository• Checking query results using Oracle BI Answers• Checking query results by inspecting the query log

Each of these steps is covered in detail in the following slides.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 154: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 4

Copyright © 2008, Oracle. All rights reserved.

ABC Example

Validate and test the SupplierSales business model before making it available for querying by users.

SupplierSales is not available for queries.

ABC ExampleUp to this point in the course, you have created ABC’s SupplierSales business model but have not yet checked it or made it available for querying by users. The following slides describe the tools and steps that can be used to validate and test the model.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 155: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 5

Copyright © 2008, Oracle. All rights reserved.

Consistency Check

Is a feature of the Administration Tool that checks whether a repository has met certain requirements, such as:• All logical columns are mapped directly or indirectly to one or

more physical columns.• All logical dimension tables have a logical key.• All logical tables have a logical join relationship to another

logical table.• There are at least two logical tables in the business model:

a logical fact table and a logical dimension table. Both can map to the same physical table.

• There are no circular logical join relationships.• A presentation catalog exists for the business model.

Consistency CheckRepositories and the business models within them must pass the consistency check before you can make them available for queries. When a repository or business model is inconsistent, a detailed message alerts you to the nature of the inconsistency. The slide identifies the requirements for a consistent repository.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 156: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 6

Copyright © 2008, Oracle. All rights reserved.

Checking Consistency

Check consistency for the entire repository or for individual repository objects by using either of the following menus:

File menu Tools menu

Right-clicking the object

Checking ConsistencyYou can check consistency for the entire repository or for a single object. To check the consistency of an entire repository, select File > Check Global Consistency.To check the consistency for an individual repository object, select the object and then select Tools > Check Consistency, or right-click the object and select Check Consistency. You can select multiple objects and check their consistency.Each time you save a repository, a dialog box asks if you want to check global consistency. You have the following options:

• Yes: Checks global consistency and then saves the repository file• No: Does not check global consistency and saves the repository file• Cancel: Does not check global consistency and does not save the repository file

In offline editing, remember to save your repository from time to time. You can save a repository in offline mode even though the business models may be inconsistent.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 157: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 7

Copyright © 2008, Oracle. All rights reserved.

Consistency Check Manager

Displays consistency check messages• Errors: Must be fixed to make the repository consistent• Warnings: Condition that may or may not be an error• Best Practices: Condition does not indicate an inconsistency

Consistency Check ManagerIf a repository or object is consistent, the Consistency Check Manager is displayed with no error messages. If a repository or object is not consistent, the Consistency Check Manager displays a detailed message that contains information about the nature of the inconsistency. The Consistency Check Manager displays three types of messages:

• Error messages indicate errors that need to be fixed to make the repository consistent.• Warning messages indicate conditions that may or may not be errors, depending upon the intent

of the Oracle BI Server administrator. For example, a warning message about a disabled join may be the result of the administrator disabling a join intentionally during repository development.

• Best Practice messages provide information about conditions but do not indicate an inconsistency—for example, a physical table without a key.

For each message, the Consistency Check Manager identifies the message type, the object type, and the object, and provides a detailed description of the message. There are options to display only selected message types, display results using qualified names, check all objects in the repository, and copy the results to another file. If the Consistency Check Manager displays any errors, edit the repository to correct the inconsistencies and run the consistency check again.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 158: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 8

Copyright © 2008, Oracle. All rights reserved.

Disabling Consistency Check Messages

The Options tab in the Consistency Check Manager helps to enable or disable consistency messages.

Disabling Consistency Check MessagesAn administrator may determine that certain consistency check messages can be ignored. In such a case, it is possible to disable consistency check messages using the Options tab in the Consistency Check Manager.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 159: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 9

Copyright © 2008, Oracle. All rights reserved.

Enabling Logging

• Oracle BI Server provides a facility for logging query activity at the individual user level.

• Logging is intended for quality assurance testing, debugging, and use by Oracle Technical Support.

• Query logging is normally disabled in production mode.• The query log file is named NQQuery.log and is located in

the \OracleBI\server\Log directory.

Enabling LoggingOracle BI Server provides a facility for logging query activity at the individual user level. Logging is intended for quality assurance testing, debugging, and for use by Oracle Technical Support. In production mode, query logging is normally disabled. The query log file is named the NQQuery.log file. This file is in the Log subdirectory in the Oracle BI\server installation folder.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 160: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 10

Copyright © 2008, Oracle. All rights reserved.

Setting a Logging Level

Use the Security Manager to enable logging level for individual users.

Set the logging level.

Setting a Logging LevelTo test the repository, you need to generate some queries, retrieve the results, and examine the query log. Because query logging can produce very large log files, the logging system is turned off by default. It is sometimes useful, however, to enable logging to test that your repository is configured properly, to monitor activity on your system, to help solve performance problems, or to assist Oracle Technical Support. You need to enable logging on the system for each user whose queries you want logged. Use the Security Manager to enable logging level for an individual. You cannot configure logging levels for a group of users. The Security Manager has other functions and is described in the lesson titled “Security.”

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 161: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 11

Copyright © 2008, Oracle. All rights reserved.

Logging Levels

Log levels 1 and 2 are designed for server administrators.

Repository name, business model name, presentation catalog name

SQL for the request using business model names

SQL for the request using physical data source syntax

Query status (success, failure, termination, or timeout)

All items for Level 1, plus those mentioned below:

Username, session ID, and request ID for each query

Queries issued against the cacheElapsed times for query compilation, execution, query cache, and back-end database processing

Number of rows returned from a physical databaseNumber of rows returned to the client

Level 2 Logs: Level 1 Logs:

Logging LevelsSet the logging level based on the amount of logging you want the Oracle BI Server to perform. In normal operations, logging is generally disabled (the logging level is set to 0). If you decide to enable logging, select a logging level of 1 or 2. These two levels are designed for use by Oracle BI Server administrators. Note that logging levels greater than 2 should be used only with the assistance of Oracle Technical Support.The table shows differences between logging levels 1 and 2. Level 2 provides more detailed information than level 1. Refer to the Oracle BI Server Administration Guide for a complete description of logging levels. You can turn on the logging levels in offline or online mode. In online mode, you need to check out the users, set the logging levels, check in the users, save the changes to the repository, and refresh (or reload) the server metadata.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 162: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 12

Copyright © 2008, Oracle. All rights reserved.

Adding a Repository Entry to an Initialization File

After you build a repository and it is consistent, you need to add an entry in the NQSConfig.ini file.

Adding a Repository Entry to an Initialization FileAfter you confirm that a repository is consistent and you have enabled logging, you need to update the Repository section of the NQSConfig.ini initialization file. An entry in the Repository section of this file instructs Oracle BI Server to load a specific repository into memory upon startup. If Oracle BI Server detects an error while loading the repository, it logs the error to the server log file (NQServer.log). You may add a new entry to the file or alter the existing entry. Adding a leading “#” sign in front of a line causes the line to be treated as a comment. Common causes for Oracle BI Server failing to load a consistent repository are: typographical error in the file name or the file not being in the default repository directory. The format is logical_name = repository_file_name. The logical name is the name that users must use when configuring a data source name (DSN) in the Oracle BI Open Database Connectivity (ODBC) setup wizard. Star is the default logical name for the AnalyticsWeb DSN.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 163: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 13

Copyright © 2008, Oracle. All rights reserved.

Loading the Repository

• If the repository was edited in offline mode, start or restart Oracle BI Server to load the repository.

• If the repository was edited in online mode, check in changes and reload the server metadata in Answers.

Reload server metadata.

Start Oracle BI Server.

Loading the RepositoryIf the repository was edited in offline mode, you need to start or restart Oracle BI Server to load the repository into memory after the repository name is entered in the NQSConfig.ini file. If the repository was edited in online mode, you can check in changes and then log in to Oracle BI Answers as an administrator and click Reload Server Metadata.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 164: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 14

Copyright © 2008, Oracle. All rights reserved.

Validating by Using Oracle BI Answers

Use Oracle BI Answers to validate the Presentation layer display and query results.

Validating by Using Oracle BI AnswersUse Oracle BI Answers to validate display of subject areas, tables, and columns based on the Presentation layer. You can also create and execute queries and check results.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 165: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 15

Copyright © 2008, Oracle. All rights reserved.

Inspecting the Query Log

Use the query log to check query results:

SQL issued from client

Repository, business model, presentation

catalog

SQL sent to database

Query status

Inspecting the Query LogThe query log contains the results of queries executed in the Oracle BI ODBC client and Oracle BI Answers. The NQQuery.log file is located in the \OracleBI\server\Log directory. You can open the file directly using a program such as Notepad, or select Settings > Administration > Manage Sessions > View Log. The log file has the following sections:

• The SQL Request section lists the SQL issued from the client application.• The General Query Info section lists the repository, the business model, and the presentation

catalog from which the query was run.• The Database Query section records the SQL sent to the underlying databases.• The Query Status section indicates if the query completed successfully or failed.

Log entries for levels 1 and 2 are generally self-explanatory. The query log can help you check the accuracy of applications that use Oracle BI Server. For example, use the log file to confirm that queries access the correct repository, subjects areas, tables, columns, and so on.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 166: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 16

Copyright © 2008, Oracle. All rights reserved.

Oracle BI SELECT Statement Syntax

Basic syntax for an Oracle BI SELECT statementSELECT columnsFROM catalog folder or tablesWHERE filtering conditionsGROUP BY (optional, special use)ORDER BY columns (optional)

ExampleSELECT Region, DollarsFROM SupplierSalesWHERE Year = 1999ORDER BY Dollars desc

SELECT Query Specification Syntax The slide identifies the basic syntax for an Oracle BI SELECT statement. The SELECT statement is the basis for querying any SQL database. Oracle BI Server accepts logical requests to query objects in a repository, and users (or query tools) make those logical requests with ordinary SQL SELECTstatements. The server then translates the logical requests into physical queries against one or more data sources, combines the results to match the logical request, and returns the answer to the end user. The SELECT statement (or query specification, as it is sometimes called) is the way to query a decision support system through Oracle BI Server. A SELECT statement returns a table to the client that matches the query. It is a table because the results are in the form of rows and columns.Table names can be included in the SELECT list (as Table.Column) but are optional unless column names are not unique within a business model. You can specify the name of a catalog folder instead of a list of tables to simplify the FROM clause creation. The next slide identifies the differences between standard SQL SELECT statements and Oracle BI SELECT statements.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 167: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 17

Copyright © 2008, Oracle. All rights reserved.

Oracle BI SELECT Statement Compared with Standard SQL

Oracle BI SELECT statements are different from standard SQL in the following ways:• No join information is required.

– Join conditions are predefined in the repository.– Any join conditions supplied in a query are ignored.

• No aggregation functions are required.– Aggregation rules are known to the server and aggregation is

performed automatically.• No GROUP BY clause is required.

– If aggregated data is requested in the SELECT statement, a GROUP BY clause is automatically assumed by the server.

• No DISTINCT keyword is required.– Oracle BI Server always issues SELECT DISTINCT to

eliminate duplicate rows automatically.

Oracle BI SELECT Statement Compared with Standard SQL The SELECT statement is similar to standard SQL, but there are differences. Join specifications: Because Oracle BI Server uses its metadata to determine the physical tables and the necessary join specifications, no join information is required. It is ignored if it is included. Aggregation functions: Because the aggregation rules have also been defined in the metadata, no aggregation functions are required, for example, sum(ColumnA). GROUP BY clause: If aggregated data is requested in the SELECT statement, a GROUP BY clause is automatically assumed by the server. When no GROUP BY clause is specified, the GROUP BYspecification defaults to all the nonaggregation columns in the SELECT list. If you explicitly use aggregation functions in the SELECT list, you can specify a GROUP BY clause with different columns and Oracle BI Server computes the results based on the level specified in the GROUP BYclause.DISTINCT keyword: Oracle BI Server always issues SELECT DISTINCT to eliminate duplicate rows automatically. Thus if you want to see Dollars by Region in 1999, you can issue the following SELECT statement: SELECT Region, Dollars FROM SupplierSales WHERE Year = 1999.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 168: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 18

Copyright © 2008, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to execute the steps to test and validate a repository.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 169: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 19

Copyright © 2008, Oracle. All rights reserved.

Practice 5-1 Overview: Testing the Repository

This practice covers the following topics:• Checking repository for consistency• Enabling logging • Loading a repository• Validating a repository using Oracle BI Answers• Inspecting the query log

Practice 5-1 Overview: Testing a RepositoryYou have finished building the initial business model and now need to test the repository before publishing it to users. You begin by checking the repository for errors using the check consistency option. You then enable logging and test the repository by running queries using Oracle BI Answers. Finally, you examine the query log file to validate the SQL generated by Oracle BI Server.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 170: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 5 - 20

Copyright © 2008, Oracle. All rights reserved.

Practice 5-2 Overview: Checking Consistency

This practice covers the following topics:• Generating an inconsistent business model• Checking consistency• Fixing consistency errors

Practice 5-2 Overview: Checking ConsistencyIn the previous practice, you tested the business model successfully and made it available for querying by users. In this practice, you modify your business model to generate an inconsistent business model to further understand the requirements for troubleshooting such a model.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 171: Student Guide OBIEE 1

Copyright © 2008, Oracle. All rights reserved.

Adding Multiple Logical Table Sources

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 172: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 2

Copyright © 2008, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to:• Describe normalized and denormalized table structures in

database designs• Add multiple sources to a logical table source (LTS) for a

dimension in the business model• Add a second logical table source to a dimension in the

business model

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 173: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 3

Copyright © 2008, Oracle. All rights reserved.

Table Structures

• Normalized table structure:– Consists of many tables where data has been split or

normalized– Is used for inserts and updates– Does not work well for queries that perform business data

analysis• Denormalized table structure:

– Follows a business model and is easier to understand– Has data that may be duplicated in several locations in a

database– Can take the form of a star schema– Provides better query performance

Table StructuresNormalized schemas are used in many online transaction processing (OLTP) systems. They have many tables (hundreds or even thousands) because the data has been carefully taken apart—normalized, in database terminology—with the primary goal of reducing data redundancy and bringing about fast update performance. These schemas generally do not work well for queries that perform historical analysis due to two major problems: poor performance and difficulty in posing the question in SQL.A dimensional schema is a denormalized schema that follows a business model. This structure contains dimension tables, which contain attributes of the business, and fact tables, which contain individual records with facts and foreign keys to each of the dimension tables. Dimensional schemas work well for business analysis and have two major advantages: they have better query performance and are easier to understand.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 174: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 4

Copyright © 2008, Oracle. All rights reserved.

Business Challenge

Data may be spread across several physical tables and needs to be mapped to a single logical table.

Normalized tables contain additional product information.

Business ChallengeThis slide presents the business challenge: adding information to a logical dimension table when the additional information is spread across many physical tables with a normalized table structure. Many database administrators consider normalized table structures as good database design, so this is common. The challenge is to map these disparate physical tables to a single logical table regardless of whether the data is normalized or duplicated. In this example, normalized tables contain additional product information and must be mapped to the Product logical dimension table.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 175: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 5

Copyright © 2008, Oracle. All rights reserved.

Business Solution

Model multiple physical sources for the logical table:• Add multiple sources to an LTS.

– Where data is not duplicated across tables• Add a new logical table source.

– Where data is duplicated across tables

Business SolutionWhere data is not duplicated across physical tables, you model multiple physical sources for a dimension table by adding physical tables to a logical table source. Where data is duplicated in the physical sources, add a second logical table source to configure the most economical source.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 176: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 6

Copyright © 2008, Oracle. All rights reserved.

ABC Example: Adding Multiple Sources to a Logical Table Source (LTS)

Add normalized tables that store product code, product type, pricing, and supplier information to the Product dimension in the SupplierSales business model.

Additional product information is contained in separate tables and joined to the D1_PRODUCTS root table.

ABC Example: Adding Multiple Sources to a Logical Table Source (LTS)In the ABC example, all product information is stored in multiple normalized physical tables. D1_PRODUCTS is the root table and additional product information is stored in multiple detail tables that snowflake off the root table. Up to this point in the ABC example, the logical columns for the Products logical table have mapped only to the D1_PRODUCTS root product table. Now you want to include additional information from the other product tables that snowflake off the root table. Because the data is not duplicated across the physical tables, you use a logical table source to add multiple sources to the Products logical dimension table.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 177: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 7

Copyright © 2008, Oracle. All rights reserved.

Implementation Steps:Adding Multiple Sources to an LTS

1. Import additional product tables.2. Define keys and joins.3. Identify physical columns for mappings.4. Add sources to a logical table source:

– Manual method– Drag method

5. Rename logical columns.6. Add columns to the Presentation layer.

Implementation Steps: Adding Multiple Sources to an LTSThis slide lists the implementation steps for adding multiple tables and columns to a logical table source where data is not duplicated across tables. Later in this lesson, you learn how to add a new logical table source to a logical dimension table to handle duplicate data.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 178: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 8

Copyright © 2008, Oracle. All rights reserved.

1. Import Additional Product Tables

Import additional product tables that store product code, product type, pricing, and supplier information.

1. Import Additional Product Tables The first step is to import additional product tables that store product code, product type, pricing, and supplier information. The product dimension is an example of where information has been stored physically in a normalized table structure. Writers such as Ralph Kimball sometimes call this structure “snowflaking a dimension.” Many database administrators (DBAs) regard this as good database design, so this is a very common practice. So far, you have included only the root product table information in the logical subject area. After import, you can include information from the other product tables.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 179: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 9

Copyright © 2008, Oracle. All rights reserved.

2. Define Keys and Joins

Define the keys and joins for the imported product tables.

2. Define Keys and JoinsUse known techniques to define the keys and joins for the newly imported product tables in the Physical layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 180: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 10

Copyright © 2008, Oracle. All rights reserved.

3. Identify Physical Columns for Mappings

Locate the columns in the Physical layer with the additional product information.

3. Identify Physical Columns for MappingsAfter importing the table schemas into the Physical layer and configuring join relationships, locate the columns that store the additional product information that you want to add to the Product logical table.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 181: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 11

Copyright © 2008, Oracle. All rights reserved.

4. Adding Sources to an LTS

You can add sources to an LTS by the following methods:• Manual: Use the Properties dialog box of a logical table

source to map tables and columns.• Drag: Drag columns from the Physical layer to a logical table

source to automatically map tables and columns.

4. Adding Sources to an LTSThere are various methods for adding sources to an LTS. Each method is described in the following slides.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 182: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 12

Copyright © 2008, Oracle. All rights reserved.

4a. Manual: Create New Logical Column

Create a new logical column for a logical dimension table.

1. Right-click the logical table.

2. Create a new logical column.

New logical column

4a. Manual: Create New Logical ColumnUsing the manual method, the first step is to manually create a new logical column. In this example, you add a new Price logical column to the Products logical dimension table.

1. Right-click the Products logical dimension table and select New Object > Logical Column.2. Enter Price in the Name field in the Logical Column dialog box.3. The new Price logical column is added to Products logical dimension table in the Business

Model and Mapping (BMM) layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 183: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 13

Copyright © 2008, Oracle. All rights reserved.

4a. Manual: Add New Physical Source

Use the Properties dialog box of a logical table source to add anew physical table to the source.

3. Click Add.

1. Double-click.

2.

4. Select a table.

4a. Manual: Add New Physical SourceAfter the logical column is created, use the Properties dialog box of a logical table source to add a new physical table to the logical table source. In this example, you add the D1_PRICELISTphysical table to the D1_PRODUCTS logical table source.

1. Double-click the D1_PRODUCTS logical table source to open the Logical Table Source dialog box.

2. Click the General tab.3. Click the Add button. The Browse window opens and automatically displays those tables that

are joined directly to the table already in the logical table source. Only tables that join to tables included in the logical source can be added to the logical source.

4. Select the D1_PRICELIST physical table. You can double-click the table or select it and click the Select button.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 184: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 14

Copyright © 2008, Oracle. All rights reserved.

4a. Manual: Create Column Mapping

Use the Properties dialog box of a logical table source to map anew logical column to a physical column in the new source.

4. Use Expression Builder to build mapping.

1. Double-click.

2.

3. Click ellipsis.

4a. Manual: Create Column MappingAfter you have created the logical column and added a new physical source to the logical table source, you need to map the logical column to the appropriate physical column. In this example, you map the Price logical column to the PRICE physical column in the D1_PRICELIST physical table.

1. Double-click the D1_PRODUCTS logical table source to open the Logical Table Source dialog box.

2. Click the Column Mapping tab.3. Click the ellipsis button next to the Price logical column to open the Expression Builder.4. Use the Expression Builder to map the Price logical column to the PRICE physical column in

the D1_PRICELIST physical table.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 185: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 15

Copyright © 2008, Oracle. All rights reserved.

4a. Manual: End Result

D1_PRODUCTS logical table source now maps to two

physical tables: D1_PRODUCTSand D1_PRICELIST.

Price logical column maps to thePRICE physical column in theD1_PRICELIST physical table.

4a. Manual: End ResultThe end result of the manual process is that the logical table source maps to multiple physical tables and the new logical column maps to the appropriate physical column. In this example, the D1_PRODUCTS logical table source now maps to two physical tables: D1_PRODUCTS and D1_PRICELIST. The Price logical column maps to the PRICE physical column in the D1_PRICELIST physical table.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 186: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 16

Copyright © 2008, Oracle. All rights reserved.

4b. Drag Method

Drag physical columns to a logical table source.

4b. Drag MethodThis is a more efficient method for creating multiple sources for a logical table source. The first step is to drag the desired columns from the Physical layer to the logical table source in the BMM layer. In this example, you drag the DIET_TYPE, ITEMSUBTYPE, ITEMTYPE, and ITEMSUPPLIERphysical columns to the D1_PRODUCTS logical table source for the Product logical dimension table. Note that the columns are dragged from multiple physical tables.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 187: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 17

Copyright © 2008, Oracle. All rights reserved.

4b. Drag Method: Logical Columns Added

Dragging physical columns to a logical table source automatically creates logical columns in the BMM layer.

4b. Drag Method: Logical Columns AddedDragging physical columns to a logical table source automatically creates logical columns in the BMM layer. In this example, there are four new logical columns for the Product logical dimension table: DIET_TYPE, ITEMSUBTYPE, ITEMTYPE, and ITEMSUPPLIER.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 188: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 18

Copyright © 2008, Oracle. All rights reserved.

4b. Drag Method: Physical Tables Added

Dragging physical columns to a logical table source automatically adds physical tables to the logical table source.

New tables added

Physical joins displayed

View join details.

4b. Drag Method: Physical Tables AddedDragging physical columns to a logical table source also automatically adds the corresponding physical tables to the logical table source. In this example, the following tables have been added to the D1_PRODUCTS logical table source:• D1_PRODUCT_SUBTYPE• D1_PRODUCT_TYPE• D1_PROD_DIET_TYPE• D1_SUPPLIERS

The physical joins are also displayed on the General tab, although the screenshot displays only two. Select a join and click View Details to open the Joins dialog box and view the join properties.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 189: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 19

Copyright © 2008, Oracle. All rights reserved.

4b. Drag Method: Column Mappings Added

Dragging physical columns to a logical table source automatically adds column mappings to the logical table source.

New mappings

4b. Drag Method: Column Mappings AddedDragging physical columns to a logical table source also automatically adds column mappings to the logical table source. In this example, the following mappings have been added:• DIET_TYPE logical column maps to D1_PROD_DIET_TYPES.DIET_TYPE.• ITEMSUBTYPE logical column maps to D1_PRODUCT_SUBTYPE.ITEMSUBTYPE.• ITEMSUPPLIER logical column maps to D1_SUPPLIERS.ITEMSUPPLIER.• ITEMTYPE logical column maps to D1_PRODUCT_TYPE.ITEMTYPE.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 190: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 20

Copyright © 2008, Oracle. All rights reserved.

5. Rename Logical Columns

Rename new logical columns with names that are meaningful to users.

5. Rename Logical ColumnsWhichever method you use to add sources to a logical table source, you should rename logical columns with names that are meaningful to users.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 191: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 21

Copyright © 2008, Oracle. All rights reserved.

6. Add Columns to the Presentation Layer

Drag the new logical columns to the Product presentation table to make them available to users.

6. Add Columns to the Presentation LayerTo make the columns visible to users, you must drag the new logical columns to the Products presentation table in the Presentation layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 192: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 22

Copyright © 2008, Oracle. All rights reserved.

ABC Example:Adding a New Logical Table Source

Add a second logical table source to the Product dimension so that Oracle BI Server queries only one table for Type Code and Type information.

New logical table source

ABC Example: Adding a New Logical Table SourceType and Type Code data are duplicated across multiple physical sources. In examining the column mappings for the D1_PRODUCTS logical table source for the Products dimension table, you discover that the Type Code and Type columns are mapped to different physical tables, but the information for both is stored in a common D1_PRODUCT_TYPE physical table. To model the most economical method for Oracle BI Server to execute queries for these two columns, you add a second logical table source to the Product dimension so that Oracle BI Server queries only one table for the Type Code and Type information.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 193: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 23

Copyright © 2008, Oracle. All rights reserved.

Implementation Steps:Adding a New Logical Table Source

1. Examine the existing column mappings.2. Identify a single table that stores both columns.3. Add a new logical table source.4. Define the content of the logical table source.

Implementation Steps: Adding a New Logical Table SourceThis slides lists the steps for adding a new logical table source where data is duplicated across tables. Each step is discussed in detail in the slides that follow.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 194: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 24

Copyright © 2008, Oracle. All rights reserved.

1. Examine Existing Column Mappings

Examine column mappings for Type and Type Code columns in the D1_PRODUCTS logical table source.

Type maps to the D1_PRODUCT_TYPE

table.

Type Code maps to the D1_PRODUCTS

table.

1. Examine Existing Column MappingsDragging columns to the D1_PRODUCTS logical table source created new column mappings. You examine the mappings and find that the Type column maps to ITEMTYPE in the D1_PRODUCT_TYPE table and the Type Code column maps to TYPECODE in the D1_PRODUCTS table.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 195: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 25

Copyright © 2008, Oracle. All rights reserved.

2. Identify a Single Table That Stores Both Columns

Examine the D1_PRODUCT_TYPE table and see that it contains both ITEMTYPE and TYPECODE.

2. Identify a Single Table That Stores Both ColumnsD1_PRODUCT_TYPE contains both columns, ITEMTYPE and TYPECODE. Thus TYPECODE is duplicated across the D1_PRODUCTS and D1_PRODUCT_TYPE tables.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 196: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 26

Copyright © 2008, Oracle. All rights reserved.

3. Add a New Logical Table Source

Add a new logical table source for the Products logical dimension table that maps to the columns in D1_PRODUCT_TYPE.

New logical table source

Column mappings

3. Add a New Logical Table SourceUse the manual or drag method to add a new logical table source to the Products logical dimension table. Map both the Type and Type Code logical columns to the corresponding physical columns in D1_PRODUCT_TYPE.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 197: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 27

Copyright © 2008, Oracle. All rights reserved.

4. Define the Content of the Logical Table Source

Use the Content tab in the Logical Table Source dialog box to define content for the source.

New logical table source

4. Defining the Content of the Logical Table SourceThere are now two logical table sources for the Products dimension: D1_PRODUCTS and Type. The Type Code logical column is mapped in both the logical table sources and, therefore, maps to both the D1_PRODUCT_TYPE and D1_PRODUCTS tables. After you build dimension hierarchies, you let Oracle BI Server know which logical table source to use by specifying the aggregation content for the Type logical table source on the Content tab. You perform this step later in the lesson titled “Using Aggregates.” Then, when a query is executed that includes the Type and Type Codelogical columns, Oracle BI Server accesses only one table, D1_PRODUCT_TYPE. Because D1_PRODUCT_TYPE stores information for both columns, it is the more economical source. Note that you do not have to modify the Presentation layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 198: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 28

Copyright © 2008, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to:• Describe normalized and denormalized table structures in

database designs• Add multiple sources to a logical table source for a

dimension in the business model• Add a second logical table source to a dimension in the

business model

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 199: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 29

Copyright © 2008, Oracle. All rights reserved.

Practice 6-1 Overview: Enhancing the Product Dimension

This practice covers the following topics:• Importing normalized tables that contain additional product

information to the Physical layer of the repository • Defining physical keys and joins

Practice 6-1 Overview: Enhancing the Product Dimension There are product tables that store details about ABC’s products. You want to add these tables to the Product dimension in the BMM layer. You import these tables to the repository and create keys and foreign key joins for the tables.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 200: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 30

Copyright © 2008, Oracle. All rights reserved.

Practice 6-2 Overview: Creating Multiple Sources

for a Logical Table Source (Manual)

This practice covers using the manual method to add a source to a logical table source.

Practice 6-2 Overview: Creating Multiple Sources for a Logical Table Source (Manual)You have imported the product tables that store details about ABC’s products to the Physical layer of the repository and configured keys and joins for the tables. So far, the Product dimension in the BMM layer included only information from the root product table: D1_PRODUCTS. You are ready to add the information from the price list table to the Product dimension and, while doing that, simplify the data structure (in effect, create a denormalized logical table).

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 201: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 31

Copyright © 2008, Oracle. All rights reserved.

Practice 6-3 Overview: Creating Multiple Sources

for a Logical Table Source (Automated)

This practice covers using the drag method to add multiple sources to a logical table source.

Practice 6-3 Overview: Creating Multiple Sources for a Logical Table Source(Automated)

You have added the information from the price list table to the Product dimension. You are ready to add information from the other product tables to the Product dimension using an alternative method. You create multiple sources for the Product logical table source and add the columns to the Product dimension simultaneously.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 202: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 6 - 32

Copyright © 2008, Oracle. All rights reserved.

Practice 6-4 Overview: Adding a New Logical Table Source

This practice covers the following topics:• Adding a second logical table source to a logical dimension

table• Defining the content for a logical table source

Practice 6-4 Overview: Adding a New Logical Table SourceIn examining the physical sources and the Products dimension table, you find that the Type Codeand Type columns are mapped to different physical tables, while the information for both is stored in a common physical table. To model the most economical method for Oracle BI Server to find information for these two columns, you decide to add a second logical table source to the Product dimension so that Oracle BI Server queries only one table for the Type Code and Type information.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 203: Student Guide OBIEE 1

Copyright © 2008, Oracle. All rights reserved.

Adding Calculations to a Fact

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 204: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 2

Copyright © 2008, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to:• Describe a calculation measure and its use in a business

model • Create new calculation measures based on logical columns• Create new calculation measures based on physical

columns• Create new calculation measures by using the Calculation

Wizard

ObjectivesCalculations enable data to be processed to derive measures that are valuable in analysis.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 205: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 3

Copyright © 2008, Oracle. All rights reserved.

Business Problem

• Businesses need to track the effectiveness of their operations.

• Businesses want to use business—rather than technical—language to ask business questions.

– For example: Show me the accounts receivable balance as of Q3.

• Some information is derived from other data such as:– Derive money outstanding.

— Compare amount billed with amount received.– Derive units backordered.

— Compare units ordered with units shipped.

Business ProblemOften, a business wants to compare values of a measure and needs a calculation to express the comparison. For example, a business might want to compare the number of units ordered with the number of units that have actually shipped. The business might want to see this comparison in terms of actual units or a percentage. The business wants its users to be able to formulate business questions using terminology they understand.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 206: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 4

Copyright © 2008, Oracle. All rights reserved.

Business Solution

Oracle BI Server provides utilities to create calculation measures in the business model.• Use the Expression Builder to create new logical columns

with a calculation formula.– Use existing logical columns or physical columns as objects in

the formula.• Use the Calculation Wizard to create calculation measures

based on existing logical columns.• Add calculation measures to the Presentation layer so that

users can pose business questions in Answers by using familiar terminology.

Business SolutionTo meet the needs of various business measures, Oracle BI Server has a calculation engine to perform a multitude of calculations. Calculation measures enable users to make inquiries such as “Show me the accounts receivable balance as of Q3” or “Show me the difference between units ordered and units shipped.”The Expression Builder enables you to create expressions that are similar to expressions created with SQL. You use the Expression Builder to create calculation measures based on logical or physical columns that appear as a single column in Answers. You use the Calculation Wizard to create calculation measures based on existing logical columns. Users can then easily build queries using familiar terminology.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 207: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 5

Copyright © 2008, Oracle. All rights reserved.

ABC Example

ABC wants to create a calculated measure, Cuts, that tracks the difference between units ordered and units shipped.

Implement a new measure that calculates

Cuts.

ABC ExamplePayment for an order is not due until ABC ships its products. Therefore, shipment delays have a significant impact on ABC’s cash flow. ABC wants to create a calculated measure, Cuts, that tracks the difference between units ordered and units shipped. Cuts can affect customer satisfaction and, potentially, can result in lost revenue. The Cuts calculation measure is modeled in the SupplierSales business model and made available to users as a column in Oracle BI Answers.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 208: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 6

Copyright © 2008, Oracle. All rights reserved.

Implementation Methods

Calculation measures can be created using:• Existing logical columns as objects in a formula• Physical columns as objects in a formula• The Calculation Wizard to automate the process

– The Calculation Wizard creates new measure columns that compare two existing logical columns in a formula.

Implementation MethodsThere are three methods for creating calculation measures:

• Use existing logical columns as objects in a formula.• Use physical columns as objects in a formula.• Use the Calculation Wizard to automate the process.

All three methods for creating calculation measures are covered in detail in subsequent slides.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 209: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 7

Copyright © 2008, Oracle. All rights reserved.

Steps for Using Existing Logical Columns

1. Create a new logical column.2. Specify logical columns as the source.3. Build a formula.

Steps for Using Existing Logical ColumnsThese are the high-level steps for creating a calculation measure using existing logical columns. Each step is described in detail in subsequent slides.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 210: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 8

Copyright © 2008, Oracle. All rights reserved.

1. Create a New Logical Column

Right-click the fact table and select New Object > Logical Column.

Enter the name for the new column.

1. Create a New Logical Column Start by creating a new logical column (Cuts, in this example) in the fact table.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 211: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 9

Copyright © 2008, Oracle. All rights reserved.

2. Specify Logical Columns as the Source

Select the “Use existing logical columns as the source” check box.

2. Specify Logical Columns As the SourceSelect “Use existing logical columns as the source” on the General tab of the column properties to specify that you want to use existing logical columns in the calculation for the new Cuts column.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 212: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 10

Copyright © 2008, Oracle. All rights reserved.

3. Build a Formula

Open the Expression Builder and build the calculation formula using existing logical columns.

Click the ellipsis button to open the Expression Builder.

3. Build a FormulaOpen the Expression Builder to create the calculation formula (Units Ordered minus Units Shipped) using the existing logical columns. After you finish, Cuts appears as a new logical column in the fact table. If there are any aggregation rules applied to the logical columns, those aggregation rules are automatically applied in the formula. In this example, both Units Ordered and Units Shipped already have SUM aggregation rules applied. (Recall that you applied these rules in an earlier lesson.) Thus the calculation formula is sum(Units Ordered) – sum(Units Shipped). After you finish, Cuts appears as a logical column for the SalesFacts logical fact table in the Business Model and Mapping layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 213: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 11

Copyright © 2008, Oracle. All rights reserved.

Steps for Using Physical Columns

1. Create a new logical column.2. Map the new column.3. Build the formula.4. Specify an aggregation rule.

Steps for Using Physical ColumnsThese are the high-level steps for creating a calculation measure using physical columns. Each step is described in the subsequent slides.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 214: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 12

Copyright © 2008, Oracle. All rights reserved.

1. Create a New Logical Column

Right-click the fact table and select New Object > Logical Column.

Enter the name for the new column.

Deselect.

1. Create a New Logical ColumnStart by creating a new logical column (CutsP, in this example) in the fact table. Ensure that the “Use existing logical column as the source” check box is deselected to specify that physical columns are used as the source in the calculation for the new CutsP column.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 215: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 13

Copyright © 2008, Oracle. All rights reserved.

2. Map the New Column

Use the Column Mapping tab of the Logical Table Source dialog box to open the Expression Builder for the new column.

Click to open the Expression Builder.

Show unmapped columns.

2. Map the New ColumnTo access the Expression Builder, open the properties dialog box for the existing logical table source, D1_ORDERS2 in this example. On the Column Mapping tab, locate the (as yet) unmapped column CutsP and click the ellipsis button to open the Expression Builder.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 216: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 14

Copyright © 2008, Oracle. All rights reserved.

3. Build the Formula

Build the calculation formula using physical columns.

Column mapping

3. Build the FormulaUsing the Expression Builder, create the calculation formula using the physical columns UNITORDDand UNITSHPD. By selecting physical columns as objects in the formula, a column mapping is also configured for the new column. After you finish, CutsP appears as a logical column for the SalesFacts logical fact table in the Business Model and Mapping (BMM) layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 217: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 15

Copyright © 2008, Oracle. All rights reserved.

4. Specify an Aggregation Rule

Click the Aggregation tab and set the aggregation rule for the CutsP column.

Double-click to open the properties dialog box.Set the aggregation rule.

4. Specify an Aggregation RuleDouble-click the new CutsP logical column to open the column properties dialog box and click the Aggregation tab. You need to set the aggregation rule because you are using physical columns, not logical columns, in the calculation formula. Recall that there are SUM aggregation rules set for the Units Ordered and Units Shipped logical columns, but not for the corresponding physical columns. The calculation formula using logical columns looks like this: sum(Units Ordered) –sum(Units Shipped), whereas the calculation formula using physical columns looks like this:

sum(UNITORDD – UNITSHPD)

In this example, because of arithmetic laws, you know that you can sum ColumnA and sum ColumnB and then take the differences of those sums, and have the same results if you calculate the difference first (the value in ColumnA – the value in ColumnB for each row) and then sum the difference.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 218: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 16

Copyright © 2008, Oracle. All rights reserved.

Steps for Using the Calculation Wizard

1. Open the Calculation Wizard.2. Choose the columns for comparison.3. Select the calculations.4. Confirm the calculation measures.5. New calculation measures are added.

Steps for Using the Calculation WizardThese are the high-level steps for creating calculation measures using the Calculation Wizard. Each step is described in the subsequent slides.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 219: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 17

Copyright © 2008, Oracle. All rights reserved.

1. Open the Calculation Wizard

Right-click a logical column that you want to use in the calculation and select Calculation Wizard.

1. Open the Calculation WizardThis slide shows how to start the Calculation Wizard. In this example, right-click Units Ordered and select Calculation Wizard to launch the wizard.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 220: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 18

Copyright © 2008, Oracle. All rights reserved.

2. Choose the Columns for Comparison

2. Choose the Columns for Comparison The wizard prompts you to select the columns that you want to compare with Units Ordered. In this example, Units Shipped is selected.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 221: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 19

Copyright © 2008, Oracle. All rights reserved.

3. Select the Calculations

3. Select the CalculationsThe wizard prompts you to select the calculations you want to model (Change and Percent Change in this example). The Calculation Wizard can create up to four calculation measures (Change, Percent Change, Index, and Percent). The wizard also prompts you to specify what value should be returned if the column has no value (null). This must be specified for all selected calculations. Select each calculation and specify what value should be returned. You can enter any numeric value or NULL. Do not enter a value that would change the data type. For example, do not enter NA, which is a character value, and not a numeric value. You can also change the calculation name at this point. This is the name that appears in the business model when the Calculation Wizard finishes. In this example, the calculation measure that calculates the difference between Units Ordered and Units Shipped is renamed CutsW.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 222: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 20

Copyright © 2008, Oracle. All rights reserved.

4. Confirm the Calculation Measures

4. Confirm the Calculation MeasuresThe Calculation Wizard identifies the two calculation measures that it creates. Click Finish to add the new measures to the fact table.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 223: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 21

Copyright © 2008, Oracle. All rights reserved.

5. New Calculation Measures Are Added

New calculation measures are automatically added to the business model.

5. New Calculation Measures Added When you click Finish, the new calculation measures are automatically added to the business model.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 224: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 22

Copyright © 2008, Oracle. All rights reserved.

Add New Measures to the Presentation Layer

Add new calculation measures to the Presentation layer regardless of the method used to create the measures.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 225: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 23

Copyright © 2008, Oracle. All rights reserved.

Examining a Query Using Physical Columns

Use physical columns for calculations that require an aggregation rule to be applied after the calculation.

SQL calculates difference between Units Ordered and Units

Shipped and applies the aggregation rule after the

calculation.

Query uses a calculation measure based on physical columns.

Examining a Query Using Physical Columns You use physical columns for calculations that require that an aggregation rule be applied after the calculation. This slide examines the query log for a query that uses the CutsP calculation measure, which was built using physical columns in the formula. In this case, the SQL calculates the difference between Units Ordered (UNITORDD) and Units Shipped (UNITSHPD), and then applies the SUM aggregation rule. This is expressed as sum(UNITORDD – UNITSHPD). This is easily determined by knowing when an aggregation rule is applied in the calculation.

• Use logical columns when the aggregation rule is applied before the calculation.• Use physical columns when the aggregation rule is applied after the calculation.

The next slide provides an example of when to configure a calculation measure based on physical columns.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 226: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 24

Copyright © 2008, Oracle. All rights reserved.

Example: Using Physical Columns

To calculate total revenue accurately, multiply the Unit Priceby the number of Units Sold for each row, and then apply the SUM aggregation rule to the total.

Example: Using Physical ColumnsIn this example the calculation measure Total Revenue is based on physical columns and the aggregation rule is applied after the calculation.Total revenue is derived by calculating, row-by-row, the unit price times units sold and then applying the SUM aggregation rule after the calculation to find total revenue, which equals $3,400.What would happen if the aggregation rule was applied before the calculation? In other words, what would happen if the calculation measure Total Revenue was based on logical columns?Applying the summation (aggregation rule) before the calculation is as follows:

• Unit price $500 + $400 + $300 = $1,200• Units sold 2 + 3 + 4 = 9

The calculation is then:• $1,200 9 = $10,800

This calculation is not correct. Applying the aggregation rule (summing the unit price and the units sold) before the calculation (unit price * units ordered) does not give total revenue accurately.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 227: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 25

Copyright © 2008, Oracle. All rights reserved.

Examining a Query Using Logical Columns

Use logical columns for calculation formulas that require an aggregation rule that is applied before the calculation.

SQL first applies the aggregation

rules to the columns …

… and then calculates the difference.

Query uses a calculation measure based on logical columns.

Examining a Query Using Logical ColumnsUse logical columns for calculation formulas that require an aggregation rule that is applied beforethe calculation. This slide examines the query log for a query that uses the Cuts calculation measure, which was built using existing logical columns in the formula. In this case, the SQL applies the SUM aggregation rule to Units Ordered (UNITORDD) and Units Shipped (UNITSHPD) first and then calculates the difference. This is expressed in this example as D1.c1 – D1.c2. The next slide provides an example of when to configure a calculation measure based on logical columns.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 228: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 26

Copyright © 2008, Oracle. All rights reserved.

Example: Using Logical Columns

To accurately calculate unit price, sum Total Price and Units Sold first and then divide Total Price by Units Sold to determine Unit Price.

Example: Using Logical ColumnsIn this example, the calculation measure Unit Price is based on logical columns; therefore, the aggregation rule is applied before the calculation. Unit Price is found by applying the SUM aggregation rule to both Total Price and Units Sold before calculating the unit price (dividing Total Price by Units Sold).

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 229: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 27

Copyright © 2008, Oracle. All rights reserved.

Examining a Query Using the Calculation Wizard

The Calculation Wizard uses logical columns as objects in its calculations, so aggregation rules are applied before the calculation.

SQL first applies the aggregation

rules to the columns …

… and then calculates the

difference.

Query uses a calculation measure built by the

wizard.

Examining a Query Using the Calculation WizardWhen using the Calculation Wizard to model calculation measures, it is important to consider that the wizard uses logical columns as objects in the calculation formulation; therefore, an aggregation rule is applied before the calculation.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 230: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 28

Copyright © 2008, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to:• Describe a calculation measure and its use in a business

model • Create new calculation measures based on existing logical

columns• Create new calculation measures based on physical

columns• Create new calculation measures by using the Calculation

Wizard

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 231: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 29

Copyright © 2008, Oracle. All rights reserved.

Practice 7-1 Overview: Creating Calculation Measures

by Using Logical ColumnsThis practice covers creating a calculation measure by using existing logical columns.

Practice 7-1 Overview: Creating Calculation Measures by Using Logical ColumnsYou want users to be able to track the difference between the units ordered and units shipped by selecting a single fact column called Cuts. This important business measure can potentially help track lost revenue. You use the Expression Builder to configure a formula for Cuts using existing logical columns as objects in the formula.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 232: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 30

Copyright © 2008, Oracle. All rights reserved.

Practice 7-2 Overview: Creating Calculation Measures

by Using Physical ColumnsThis practice covers creating a calculation measure by using physical columns.

Practice 7-2 Overview: Creating Calculation Measures by Using Physical ColumnsYou want users to be able to track the difference between the units ordered and units shipped by selecting a single fact column called CutsP. You use the Expression Builder to configure a formula for CutsP using physical columns as objects in the formula.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 233: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 7 - 31

Copyright © 2008, Oracle. All rights reserved.

Practice 7-3 Overview: Creating Calculation Measures

by Using the Calculation WizardThis practice covers creating a calculation measure by using the Calculation Wizard.

Practice 7-3 Overview: Creating Calculation Measures by Using the Calculation WizardYou use the Calculation Wizard to model two calculation measures: Chg Units Shipped and % Chg Units Shipped. The Chg Units Shipped measure calculates the difference between the units ordered and units shipped. The % Chg Units Shipped measure calculates the percentage of units ordered that has not been shipped. The calculation measures that are created by the wizard are based on existing logical columns. You rename these columns CutsW and Percent Not Shipped in the Presentation layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 234: Student Guide OBIEE 1

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 235: Student Guide OBIEE 1

Copyright © 2008, Oracle. All rights reserved.

Creating Dimension Hierarchies andLevel-Based Measures

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 236: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 2

Copyright © 2008, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to:• Create dimension hierarchies • Create level-based measures• Create rank and share measures

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 237: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 3

Copyright © 2008, Oracle. All rights reserved.

Dimension Hierarchies

• Introduce formal hierarchies into a business model• Establish levels for data groupings and calculations • Provide paths for drill down

Period dimension hierarchy

Years

Quarters

Months

Days

Levels

Grand Total

Dimension HierarchiesDimension hierarchies introduce formal hierarchies into a business model, allowing Oracle BI Server to calculate useful measures and allowing users to drill down to more detail. In a business model, a dimension hierarchy represents a hierarchical organization of logical columns belonging to a single logical dimension table. Common dimensions used in a business model are time periods, products, customers, suppliers, and so on.Dimension hierarchies are created in the Business Model and Mapping (BMM) layer and users do not see them in Oracle BI Answers or Interactive Dashboards. In each dimension hierarchy, you organize dimension attributes into hierarchical levels. These levels represent the organizational rules and reporting needs required by your business. They provide the structure that Oracle BI Server uses to drill into and across dimensions to get more detailed views of the data. Dimension hierarchy levels are used to perform aggregate navigation, configure level-based measure calculations, and determine what attributes appear when Oracle BI users drill down in their data requests. The graphic illustrates a period dimension hierarchy, where Grand Total is the level representing the grand total for a dimension, Years is the first parent level, Quarters is a child level of Years, Months is a child level of Quarters, and Days is a child level of Months.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 238: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 4

Copyright © 2008, Oracle. All rights reserved.

Level-Based Measures

Are columns whose values are calculated to a specific level of aggregation

Measures

PeriodRevenue

YearRevenue

QuarterRevenue

MonthRevenue

DayRevenue

Period dimension hierarchy

Years

Quarters

Months

Days

Levels

Grand Total

Level-Based MeasuresA level-based measure is a column whose values are always calculated to a specific level of aggregation. For example, a company might want to measure its revenue based on the year, quarter, month, or day. To achieve this, you could set up logical columns to measure PeriodRevenue, YearRevenue, QuarterRevenue, MonthRevenue, and DayRevenue. The PeriodRevenue measure is an example of a level-based measure at the Grand Total level. This would calculate all revenue across all years. Level-based measures allow a single query to return data at multiple levels of aggregation. For example, a single query generated in Oracle BI Answers could return total revenue by year, quarter, month, and day for a single customer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 239: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 5

Copyright © 2008, Oracle. All rights reserved.

Share Measures

Are calculated by dividing a measure by a level-based measure to calculate a percentage.

10% (Share of Sales Attributable to

Salesperson XYZ)$100,000 (Total Sales for January)

$10,000 (Total Sales for Salesperson XYZ for January)=

Period dimension at the Months level

Share MeasuresLevel-based measures are also useful in creating share measures, which are calculated by taking a measure and dividing it by a level-based measure to calculate a percentage. For example, you can divide “salesperson revenue for a specific month” by “total revenue for a specific month” to calculate the share of the revenue generated by each salesperson.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 240: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 6

Copyright © 2008, Oracle. All rights reserved.

Dimension Hierarchy: Example

This is an example of a dimension hierarchy based on the Products dimension table.

Level

Column

Level-based

measure

DimensionAllows drill down in Answers

Measures are recalculated to the next level with drill down.

Dimension Hierarchy: ExampleHere is a specific example of a dimension hierarchy. In the SupplierSales business model, there is a dimension hierarchy based on the Products dimension table. In this example, the dimension is called ProductsDim. The dimension is identified by the multi-arrow icon. The hierarchy contains five levels: TotalProduct, Type, Subtype, Generic, and Specific. Level-based measures are associated with two levels of the hierarchy. ProductTotalDollars is associated with the TotalProduct level. ProductTypeDollars is associated with the Type level. There are also other columns and keys associated with each level. The screenshots on the right provide an example of what a user might see in Oracle BI Answers. The blue highlighted field indicates that it is possible to drill down to the next level. In this example, the user drilled down on the Condiments type to view the Subtypes. As you will see in this lesson, the ProductTotalDollars level-based measure is used to build the ProductShare measure. You also learn how to build a rank measure. The measures are automatically recalculated with drill down.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 241: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 7

Copyright © 2008, Oracle. All rights reserved.

ABC Example

ABC wants to implement dimension hierarchies for Products, Customers, and Periods.

ABC ExampleABC wants to implement three dimension hierarchies for Products, Customers, and Periods. These dimension hierarchies allow ABC to do the following:

• Build level-based measures• Build rank and share measures• Provide drill-down on charts and tables in Answers and Dashboards• Define aggregation rules that vary by dimension

Each of these is discussed in detail in the slides that follow.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 242: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 8

Copyright © 2008, Oracle. All rights reserved.

Steps to Create a Dimension Hierarchy

1. Create a dimension object.2. Add a parent-level object.3. Add child-level objects.4. Determine the number of elements.5. Specify level columns.6. Create level keys.7. Set the preferred drill path.8. Create a level-based measure.9. Create additional level-based measures.10.Create share measures.11.Create rank measures.12.Add measures to the Presentation layer.13.Test share and rank measures.

Steps to Create a Dimension HierarchyThis slide lists the high-level steps to create a dimension hierarchy. Each step is covered in detail in the slides that follow.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 243: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 9

Copyright © 2008, Oracle. All rights reserved.

1. Create a Dimension Object

Do either of the following:• Right-click the business model object and select New Object

> Dimension.• Right-click the logical dimension table and select Create

Dimension.

1. Create a Dimension ObjectThe first step is to create the dimension object. There are a couple of methods for creating a dimension object. The slide illustrates one method, which is to right-click the business model object, select New Object > Dimension, and name the dimension. The dimension hierarchy appears in the business model with a three-arrow icon.Another method is to right-click a logical dimension table and select Create Dimension. Forexample, if you right-click the Customers logical dimension table and select Create Dimension, a new dimension called CustomersDim is automatically created with two levels, Customers Total and Customers Detail. The Customers Detail level is populated with all columns from the Customers logical dimension table. The remaining steps assume that you have used the first method to create the dimension.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 244: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 10

Copyright © 2008, Oracle. All rights reserved.

2. Add a Parent-Level Object

Create the highest level of the hierarchy first.

Right-click the dimension and select Logical Level.

Select to indicate highest level.

Name

2. Add a Parent-Level ObjectThe next step is to begin to create the levels of the hierarchy. You create the highest level of the hierarchy first. Right-click the dimension and select New Object > Logical Level. The first level you create is the grand total level. Give the level a name and select the “Grand total level” check box to indicate that this is the grand total level. Because this level can have only one element (the grand total for all Periods in this example), the number of elements at this level defaults to one. Setting the number of elements at a given level is discussed in more detail in the slides that follow.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 245: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 11

Copyright © 2008, Oracle. All rights reserved.

3. Add Child-Level Objects

Add subsequent levels in the hierarchy.

Supports rollup

Right-click the level and select New

Object > Child Level.

Number of elements

Name

3. Add Child-Level ObjectsThe next step is to create the child levels. Right-click a level in the dimension and select New Object > Child 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. Methods for determining the number of elements are discussed in the next slide. The “Supports rollup to higher level of aggregation” check box is selected so that data stored at this level can be aggregated to produce the total for its parent level without double counting or leaving anything out. There are some hierarchies in which certain levels might not include all the elements of the dimension.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 246: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 12

Copyright © 2008, Oracle. All rights reserved.

4. Determine the Number of Elements

There are two methods for determining the number of elements for a dimension level object.

Update Row Counts Estimate Levels

4. Determine the Number of ElementsThe Administration Tool provides a couple of methods for determining the number of elements for a given level. Update Row CountsOne method using the Administration Tool is to determine the exact row count for each level by using the Update Row Counts feature. After you have identified the distinct row count for the column used to define the detail of each level, you can manually enter the number of elements in the level dialog box. Keep in mind that the ratio of level elements does not have to be exact. You can enter a relative value that specifies how many elements there are in relation to the number of elements at other levels in the hierarchy. The ratios between levels are used to determine the most efficient data source when multiple sources exist. Therefore, exact numbers do not produce results any different from approximate ones.Estimate LevelsThe manual method using row counts is sufficient if the number of dimensions and levels is small. However, as the number of dimensions increases, it can be very time consuming to use row counts to determine the values and then enter the values manually for every level. Therefore, you can also use the Estimate Levels feature to automatically populate the number of elements at each level of a dimension. The Estimate Levels feature automates the population of counts for levels in a dimension hierarchy and provides consistency checks for columns in levels and the counts generated for levels. To run Estimate Levels, right-click the desired dimension and select Estimate Levels. The Administration Tool must be in online mode to run Estimate Levels.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 247: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 13

Copyright © 2008, Oracle. All rights reserved.

5. Specify Level Columns

Specify which columns in the logical dimension table are associated with which levels in the dimension hierarchy.

Drag the logical column from the logical table to the level in the hierarchy to associate the column with the level.

The logical column is associated with the logical level.

5. Specify Level ColumnsAfter you create all levels in a dimension, drag one or more columns from the dimension table to each level (except the Grand Total level). The first time you drag a column to a dimension, it associates the logical table with the dimension. It also associates the logical column with that level of the dimension. In this example you drag the Date column from the Periods dimension table to the Day level in the dimension hierarchy. The Date column is now associated with the Day level in the PeriodsDim dimension hierarchy. The screenshot shows the Levels tab in the Logical Column - Date properties dialog box, indicating that the Date column is associated with the Day level in the PeriodsDim dimension hierarchy. Here are some guidelines for associating columns with levels:

• Not all columns in the dimension table need to be associated explicitly with a level; the ones that are not will be associated with the lowest level implicitly.

• No columns can be associated with more than one level, although it may be part of the level key of a lower level.

• If a column pertains to more than one level, associate it with the highest level it belongs to.• No level except the Grand Total level can exist without at least one column being associated

with it.• The Detail level (lowest level) must have the column that is logical key of the dimension table

associated with it and it must be the key for that level.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 248: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 14

Copyright © 2008, Oracle. All rights reserved.

6. Create Level Keys

Level keys define the unique elements in each level and provide the context for drill down.

Month key set to use for drill downMonth Code not set

to use for drill down

6. Create Level KeysEach level except the Grand Total 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 a level key:

• Double-click a level to open the level properties window.• Click the Keys tab and then click New to add a key.• Each level should have one level key that will be displayed when an Answers or dashboard user

clicks to drill down. This may or may not be the primary key of the level. To set the level key to display, select the “Use for drilldown” check box in the Logical Level Key dialog box.

In this example there are two keys, Month and Month Code. This means that New was selected twice to add each key. It is possible to create composite keys consisting of multiple columns, but that is not the case in this example. Month Code is the primary key and “Use for drilldown” is selected for the Month key. Therefore, when users drill down in Answers from the next highest level, the default is to drill down to the Month column, not the Month Code column. The different key icons indicate which key has “Use for drilldown” selected.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 249: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 15

Copyright © 2008, Oracle. All rights reserved.

7. Set the Preferred Drill Path

Use Preferred Drill Path to specify a drill path outside the normal drill path defined by the dimension level hierarchy.

Select logical levels from current or other

dimensions.

7. Set the Preferred Drill PathYou can use the Preferred Drill Path tab to identify the drill path to use when Oracle BI Presentation Services users drill down in their data requests. You should use this only to specify a drill path that is outside the normal drill path defined by the dimensional level hierarchy. It is most commonly used to drill from one dimension to another. You can delete a logical level from a drill path or reorder a logical level in the drill path.To add a dimension level to the preferred drill path:

• Click the Add button to open the Browse dialog box, where you can select the logical levels to include in the drill path. You can select logical levels from the current dimension or from other dimensions.

• Click OK to return to the Level dialog box. The names of the levels are added to the Names pane.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 250: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 16

Copyright © 2008, Oracle. All rights reserved.

8. Create Level-Based Measures

Example: Create a level-based measure for the Grand Total level that refers to an existing logical fact column.

1. Create a new logical column in the SalesFacts

table.

3. Formula sums the physical column.

4. Associate column to Grand Total level in the dimension.

2. Use the Expression

Builder to build the measure using existing

logical columns.

5. Measure added to

dimension

6. New column in fact table

8. Create Level-Based MeasuresThe next step is to add level-based measures to the dimensions. The examples in this slide and the slides that follow assume that you have built a Products dimension hierarchy in addition to the Periods dimension hierarchy illustrated in the previous slides. ABC wants to build level-based measures that calculate total dollars (revenue) at various levels. For example, ABC wants to build level-based measures that calculate total dollars at the Product Totaland Product Type levels. The Product Total level based measure is used later in this lesson to build a share measure.This example shows how to build the ProductTotalDollars level-based measure and associate it with the Grand Total level in the Products dimension.

1. Create a new logical column named ProductTotalDollars in the sales fact table. 2. In the ProductTotalDollars properties window, use the Expression Builder to create a measure

based on the existing Dollars fact column. 3. In this case, the Dollars column has a default aggregation rule of SUM. 4. Select the Levels tab and associate the ProductTotalDollars column with the Grand Total level

(TotalProduct in this example) in the Products dimension. 5. In the business model, the measure appears in the dimension hierarchy.6. The new fact column, ProductTotalDollars appears in the SalesFacts table.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 251: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 17

Copyright © 2008, Oracle. All rights reserved.

9. Create Additional Level-Based Measures

Create other level-based measures to make measures from various levels available simultaneously in queries.

Use Dollars measure.

Sums the physical column …

… to the Type level.

Defined like the grand total but at lower level

9. Create Additional Level-Based MeasuresYou can use the same technique to create additional measures. There is no need to repeat the total calculation if the basis is the same for different levels because the measure is calculated to the appropriate level at run time. However, if you want to show totals for different levels in the hierarchy at the same time in a request, then you must create explicit logical columns for them. For example, you might want to show results for ProductTypeDollars and Dollars in the same query. You would also need separate logical columns if the calculation for a level was different from that of another level. If the calculation is the same, you can right-click an existing level-based measure, select Duplicate, rename the measure, and then change the properties. The example in the slide shows how to build a level based measure named ProductTypeDollars at the product type level.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 252: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 18

Copyright © 2008, Oracle. All rights reserved.

10. Create Share Measures

Create a new logical fact column that calculates the share by dividing the appropriate measure by a total measure.

Show how sales of a specific product compare to the overall

sales for all products.

10. Create Share MeasuresThis slide illustrates an example of a share measure. Share measures are calculated by taking some measure and dividing it by a level-based measure to calculate a percentage. This share measure allows you to run a query in Answers to show how sales of a specific product compare to overall sales for all products. For example, a query with the criteria Product, Dollars, and ProductShare, filtered on the year 1998, would show what percentage of total sales was earned for each product in 1998.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 253: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 19

Copyright © 2008, Oracle. All rights reserved.

11. Create Rank Measures

Use the Rank display function and specify a measure by which to rank.

Rank by Dollars.

11. Create Rank MeasuresRank is a display function and does not use level-based measures in its formula. It is included here to provide an example of other types of measures you can build in the business model. You can rank by whatever is meaningful to you. In this example, ranking is by Dollars. This rank measure will allow you to run a query in Answers to show how sales during a specific time period (Month, for example) ranked compared to other months in the same time period. For example, a query with the criteria Month, Dollars, and Rank Dollars, filtered on the year 1998, would show how each month ranked in sales compared to sales for other months in 1998.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 254: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 20

Copyright © 2008, Oracle. All rights reserved.

12. Add Measures to the Presentation Layer

Add new measures to the Presentation layer so they can be used in queries.

12. Add Measures to the Presentation LayerFor measures to be available for use in queries in Oracle BI Answers, they must be made available by dragging or adding them to the Presentation layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 255: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 21

Copyright © 2008, Oracle. All rights reserved.

13. Test Share and Rank Measures

Select measures to test results, and then drill down to check relative recalculations.

Drill down for details.

Share and rank calculations are recalculated with

drill down.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 256: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 22

Copyright © 2008, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to:• Create dimension hierarchies • Create level-based measures• Create rank and share measures

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 257: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 23

Copyright © 2008, Oracle. All rights reserved.

Practice 8-1 Overview: Creating Dimension Hierarchies

This practice covers the following topics:• Creating a dimension• Creating dimension levels• Estimating and defining levels elements• Associating logical columns with levels• Specifying level keys

Practice 8-1 Overview: Creating Dimension HierarchiesDimensions are metadata objects that allow you to introduce hierarchies into a business model. The dimensions hierarchies remain hidden to users, but they enable Oracle BI Server to provide useful calculations. You need to implement three dimension hierarchies for ABC: Product, Customer, and Period. Creating dimensions hierarchies enables you to:

• Build level-based measures• Define aggregation rules that vary by dimension• Provide drill down on charts and tables in Answers and Dashboards• Describe the content of aggregate sources.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 258: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 24

Copyright © 2008, Oracle. All rights reserved.

Practice 8-2 Overview: Creating Level-Based Measures

This practice covers the following topics:• Creating logical columns to represent level totals• Associating logical columns with levels

Practice 8-2 Overview: Creating Level-Based MeasuresNow that you have created dimensions with hierarchical levels, you want to use them to implement level-based measures that calculate total dollars at various levels.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 259: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 25

Copyright © 2008, Oracle. All rights reserved.

Practice 8-3 Overview: Creating Share and Rank Measures

This practice covers the following topics:• Creating a share measure• Creating a rank measure

Practice 8-3 Overview: Creating Share and Rank Measures After creating level-based measures, you use them to create a share measure for products. You also create a rank measure.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 260: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 8 - 26

Copyright © 2008, Oracle. All rights reserved.

Practice 8-4 Overview: Creating Dimension-Specific Aggregation Rules

This practice covers creating dimension-specific aggregation rules.

Practice 8-4 Overview: Creating Dimension-Specific Aggregation RulesABC wants a measure named AvgDailyDollars, which sums dollar amounts over the Customer and Product dimensions and divides by the number of days in the Period dimension. This measure can be used to compare the average daily dollar amount from month to month when the number of order days in each month varies.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 261: Student Guide OBIEE 1

Copyright © 2008, Oracle. All rights reserved.

Using Aggregates

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 262: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 2

Copyright © 2008, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to:• Describe aggregate tables and their purpose in dimensional

modeling• Model aggregate tables• Use the Aggregate Persistence Wizard to create aggregates

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 263: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 3

Copyright © 2008, Oracle. All rights reserved.

Business Challenge

• Data in fact and dimension sources is stored at the lowest level of detail.

• Data often needs to be rolled up or summarized during analysis.

• Based on the amount of data, performing calculations at the time of the query can be resource intensive and can delay results to the user.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 264: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 4

Copyright © 2008, Oracle. All rights reserved.

Business Solution: Aggregate Tables

Aggregate tables store precomputed measures that have been aggregated over a set of dimensional attributes.• Popular technique for speeding up response time

Summarized

500001998Central

2000001999West

100000

TotalDollars

1998

Year

West

Region

20600199801011005166666

155555

144444

133333

122222

Invoice

400

300

200

100

ProductKey

20199806011002

100199805051002

200199901051001

100

Dollars

19980102

PeriodKey

1001

CustomerKey

Detailed fact data table;many rows;

longer time to read and calculate

Aggregate fact table;fewer rows;

quicker to read; precalculated

Business Solution: Aggregate TablesAggregate tables store precomputed results, which are measures that have been aggregated (typically summed) over a set of dimensional attributes. Using aggregate tables is a very popular technique for speeding up query response time in decision support systems. This eliminates the need for run-time calculations and delivers faster results to users. Note that these are real physical tables. The calculations are done ahead of time and the results are stored in the tables. The key point is that the aggregate table should have fewer rows than the nonaggregate table and, therefore, processing should be quicker.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 265: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 5

Copyright © 2008, Oracle. All rights reserved.

Oracle BI Aggregate Navigation

Enables queries to use the information stored in aggregate tables automatically• Oracle BI Server decides which tables provide the fastest

answers.• Metadata must be configured for aggregate navigation.

Oracle BI Aggregate NavigationIf you are writing SQL queries or using a tool that only understands what physical tables exist (and not their meaning), putting aggregate tables to good use becomes more difficult as their number increases. The aggregate navigation capability of Oracle BI Server, however, allows queries to use the information stored in aggregate tables automatically, without query authors or query tools having to specify aggregate tables in their queries. Oracle BI Server allows you to concentrate on asking the right business question; the server decides which tables provide the fastest answers. For Oracle BI Server to have enough information to navigate to aggregate tables, you need to configure certain metadata in the repository.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 266: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 6

Copyright © 2008, Oracle. All rights reserved.

Aggregated Facts

Aggregated sales fact table columns store precomputed results at a given set of levels.

Total

District

Sales Rep

Customer

Total

Year

Quarter

Month

Day

Total

Type

Subtype

Generic

Specific

Dim

ensi

on h

iera

rchi

es

Region

Producthierarchy

Customerhierarchy

Periodhierarchy

Aggregated FactsEach aggregate table column contains data at a given set of levels. For example, an aggregated sales fact table might contain a precomputed sum of the revenue for each product in each region during each year. The graphic indicates that there is more data at lower levels in a hierarchy. As you move higher in the hierarchy, there is less data because the results are aggregated.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 267: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 7

Copyright © 2008, Oracle. All rights reserved.

Modeling Aggregates

Model aggregate tables in the same way as other source data.• Physical layer:

– Create the Open Database Connectivity (ODBC) data source (if necessary).

– Import physical sources.– Create physical joins.

• Business Model and Mapping layer:– Add sources to logical tables.– Specify aggregation content.

• Presentation layer:– No changes: Aggregate navigation is independent of the

Presentation layer objects.

New step

Modeling AggregatesThis slide outlines the steps for implementing aggregates. Modeling aggregate tables is similar to modeling other source data. You should be familiar with most of the steps because you were exposed to them previously in the course. The new step is specifying aggregation content. This involves identifying the aggregation level of the data contained in the aggregate table so that Oracle BI Server can determine when to use it for queries. These steps assume that dimension hierarchies have already been created. Note that changes to the Presentation layer are not needed. Aggregate navigation occurs at the logical, business model layer and is independent of Presentation layer objects.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 268: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 8

Copyright © 2008, Oracle. All rights reserved.

ABC Example

• Uses prebuilt aggregate tables to improve performance• Must have matching levels of aggregation for fact and

dimensions

Sales (fact) aggregated to Sales Rep, Product Type, and Month levels

Customer (dimension) aggregated to

Sales Rep level

Product (dimension) aggregated to

Type level

Period (dimension) aggregated to Month level

ABC ExampleABC has already built its dimension hierarchies. Now ABC wants to add sources that contain precomputed aggregations. You need to specify the level of aggregation for each source using logical levels. The database administrator for ABC has already created the necessary aggregate tables:

• Sales facts aggregated to the sales rep, product type, and month levels• Sales Rep aggregate with one row for each sales representative, which can be considered an

aggregation of the Customer dimension to the sales rep level• Product type aggregate with one row for each product type, which can be considered an

aggregation of the Product dimension to the type level• Month aggregate with one row for each year and month combination, which can be considered

an aggregation of the Period dimension to the month levelAggregate dimension tables are sometimes called “upper level attribute” tables because they contain only the attributes at the upper levels of the dimension.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 269: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 9

Copyright © 2008, Oracle. All rights reserved.

Steps to Implement Aggregate Navigation

1. Import tables.2. Create joins.3. Create fact logical table source and mappings.4. Specify fact aggregation content.5. Specify content for the fact detail source.6. Create dimension logical table source and mappings.7. Specify dimension aggregation content.8. Specify content for the dimension detail source.9. Test results for levels stored in aggregates.10.Test results for data above or below levels.

Steps to Implement Aggregate NavigationThese are the high-level steps to implement aggregate navigation. Each step is covered in detail in the slides that follow. Most of these steps can be automated through the use of the Aggregate Persistence Wizard, which is presented in detail later in this lesson.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 270: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 10

Copyright © 2008, Oracle. All rights reserved.

1. Import Tables

Import fact and dimension aggregates.

Aggregatedimension tables

Aggregatefact table

1. Import TablesUse known techniques to import the fact and dimension aggregate tables to the Physical layer and create keys. You are importing both aggregate fact and aggregate dimension tables because you need to create logical dimension sources at the same level of detail as the fact sources.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 271: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 11

Copyright © 2008, Oracle. All rights reserved.

2. Create Joins

Use the Physical Diagram to create joins between the aggregate fact table and the aggregate dimension tables.

2. Create JoinsUse known techniques to create physical joins.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 272: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 12

Copyright © 2008, Oracle. All rights reserved.

3. Create Fact Logical Table Source and Mappings

Create the new aggregate logical table source in the existing logical fact table and map the columns.

3. Create Fact Logical Table Source and MappingsUse known techniques to create a new logical table source within the current logical fact table that points to the aggregate table. For example, drag physical columns from the fact aggregate physical table onto corresponding logical columns to map existing logical columns to the new logical table source. Note that these four columns now map to both the D1_ORDERS2 table and the D1_ORDER_AGG1table. In the next step, you configure the model to choose the appropriate table during a query based on how content is specified on the Content tab.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 273: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 13

Copyright © 2008, Oracle. All rights reserved.

4. Specify Fact Aggregation Content

Specify the aggregation content of the new fact logical table source so that Oracle BI Server knows what level of data is stored in the aggregate tables.

4. Specify Fact Aggregation ContentUse the Content tab of the Logical Table Source dialog box to specify the aggregation content of the new aggregate logical table source. You set aggregation content for the fact table to the corresponding levels in the dimension hierarchies. In a subsequent step, you set similar levels for the dimension table aggregate sources. Later, when a user queries against a particular level, Oracle BI Server will know that it should access the aggregate tables instead of the detail tables. This is an optional step but is considered a best practice.For example, if a user queries for total sales by Month by Sales Rep, the server accesses the D1_ORDER_AGG1 aggregate fact table and the corresponding aggregate dimension tables, MONTHSand D1_SALESREP. If a user queries for a level lower than the levels specified here, for example Day instead of Month, or Customer instead of Sales Rep, then the server accesses the detail tables (D1_ORDERS2, D1_CALENDAR2, D1_CUSTOMER2). If a user queries for a higher level (Year instead of Month, District instead of Sales Rep), the aggregate tables are used as well, because whenever a query is run against a logical level or above, the aggregate tables are used.Hint: Use the More button to have the server help determine the levels.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 274: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 14

Copyright © 2008, Oracle. All rights reserved.

5. Specify Content for the Fact Detail Source

Set the levels of the fact detail source to the lowest in the hierarchies.

5. Specify Content for the Fact Detail Source This step is also optional, but it is considered a best practice to set the levels of the fact detail source to the lowest in the hierarchies. This is because you want the server to access the detail tables when queries are against levels lower than those specified for the aggregate tables. It is also good practice to specify the content of all sources for documentation purposes. This will help avoid another administrator interpreting the lack of an aggregation content statement as an inadvertent omission of information.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 275: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 15

Copyright © 2008, Oracle. All rights reserved.

6. Create Dimension Logical Table Source and Mappings

Create the new aggregate logical table source in the existing logical dimension tables and map the columns.

6. Create Dimension Logical Table Source and MappingsUse known techniques to create a new logical table source within the current logical dimension tables that points to the aggregate tables. This example shows the Customers logical dimension table. In the ABC example, you need to do this for all three logical dimension tables.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 276: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 16

Copyright © 2008, Oracle. All rights reserved.

7. Specify Dimension Aggregation Content

Specify the aggregation content of the new dimension table source so that Oracle BI Server knows what level of data is stored in the aggregate tables.

7. Specify Dimension Aggregation Content Specify the aggregation content for the new table source for the Customers table so that Oracle BI Server knows what level of data is stored in the aggregate tables. Recall that the D1_SALESREPStable contains data at the Sales Rep level within the Customer hierarchy. Again, this is an optional step but is considered to be a best practice.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 277: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 17

Copyright © 2008, Oracle. All rights reserved.

8. Specify Content for the Dimension Detail Source

Set the levels of the dimension detail source to the lowest in the hierarchies.

8. Specify Content for the Dimension Detail SourceIt is good practice to set the levels for the detail source to the lowest in the hierarchies. This is because you want the server to access the detail tables when queries are against levels lower than those specified for the aggregate tables. It is also good practice to specify the content of all sources for documentation purposes, because another administrator could interpret the lack of an aggregation content statement as an inadvertent omission of information.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 278: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 18

Copyright © 2008, Oracle. All rights reserved.

9. Test Results for Levels Stored in Aggregates

Run queries and inspect the query log to ensure that the aggregate tables are accessed as expected.

9. Test Results for Levels Stored in AggregatesIn this example, the query requests data at the levels stored in the aggregates. As expected, the Sales Rep data is retrieved from the dimension aggregate, D1_SALESREPS, and the dollars data is retrieved from the fact aggregate, D1_ORDER_AGG1.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 279: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 19

Copyright © 2008, Oracle. All rights reserved.

10. Test Results for Data Above or Below Levels

Aggregate tables used for requests at or

above the level

Detail tables used for requests

below the level

10. Test Results for Data Above or Below LevelsIn this example, the query requests data at levels above or below those stored in the aggregates. When data is requested for Sales District, which is above the Sales Rep level, the D1_SALESREPSand D1_ORDER_AGG1 aggregate tables are still used. When data is requested for Customer, which is below the Sales Rep level, the D1_CUSTOMER2 and D1_ORDERS2 detail tables are used.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 280: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 20

Copyright © 2008, Oracle. All rights reserved.

Aggregate Persistence Wizard

Automates the creation of physical aggregate tables and their corresponding objects in the repository

Use wizard to build script to

generate aggregate tables.

Script generates physical tables,

repository objects, and mappings.

Fact aggregate

Dimension aggregates

Aggregate Persistence WizardThe traditional process of creating aggregates for Oracle BI Server queries is manual. It can be tedious, requiring complicated data definition language (DDL) and data manipulation language (DML) scripts to be written for creating tables in the databases involved. Additionally, these aggregated tables need to be mapped into the repository metadata to be available for queries. This is a time-consuming and, possibly, error-prone process. The Aggregate Persistence Wizard enables the administrator to automate the creation of physical aggregate tables and their corresponding objects in the repository.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 281: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 21

Copyright © 2008, Oracle. All rights reserved.

Aggregate Persistence Wizard Steps

1. Open Aggregate Persistence Wizard.2. Specify the file name and location.3. Select business model and measures.4. Select dimensions and levels5. Select connection pool, container, and name.6. Review aggregate definition.7. View complete aggregate script.8. Verify script is created.9. Create and run a batch file.10.Verify aggregates in the Physical layer.11.Verify aggregates in the BMM layer.12.Verify aggregates in the database.13.Verify results in Answers.

Aggregate Persistence Wizard StepsThis slide lists the steps for building aggregates using the Aggregate Persistence Wizard. Each step is presented in detail in the slides that follow.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 282: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 22

Copyright © 2008, Oracle. All rights reserved.

1. Open Aggregate Persistence Wizard

Select Tools > Utilities > Aggregate Persistence Wizard and click the Execute button.

1. Open Aggregate Persistence WizardSelect Tools > Utilities > Aggregate Persistence Wizard and click the Execute button to open the Aggregate Persistence Wizard.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 283: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 23

Copyright © 2008, Oracle. All rights reserved.

2. Specify File Name and Location

Specify a file and location where the output script should be saved.

2. Specify File Name and LocationThe wizard helps you generate logical SQL scripts for creating aggregates. This file stores the aggregate specifications and is updated if more aggregates are specified. When the script is executed, the aggregates are automatically mapped and created in the metadata as well as the database.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 284: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 24

Copyright © 2008, Oracle. All rights reserved.

3. Select Business Model and Measures

Select business model.

Select fact table.

Select measures.

3. Select Business Model and MeasuresIn the top pane, select the business model. When there are multiple business models, only one can be selected. In the bottom pane, select the fact table. When there are multiple fact tables, only one fact table can be selected. Expand the fact table and select the desired measures.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 285: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 25

Copyright © 2008, Oracle. All rights reserved.

4. Select Dimensions and Levels

Select corresponding aggregate dimensions and levels.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 286: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 26

Copyright © 2008, Oracle. All rights reserved.

5. Select Connection Pool, Container, and Name

Select the database object.

Select the schema.

Select the connection pool.

Name the aggregate table.

5. Select Connection Pool, Container, and NameIn the top pane, select the repository database object. In the second pane, expand the database object and select the desired schema. In this example there is only one schema, SUPPLIER2. In the third pane, select the connection pool. In this example there is only one, SUPPLIER CP. In the Aggregate table name field, accept the default name or create a new name for the aggregate table. In this example the default name, ag_SalesFacts, is used.Note that the parameters provided here are for output, which could be to a different database than where the detail tables reside.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 287: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 27

Copyright © 2008, Oracle. All rights reserved.

6. Review Aggregate Definition

View the aggregate definition.

6. Review Aggregate DefinitionReview the aggregate definition. The screen displays the script that generates the aggregate tables based on the parameters defined in the previous steps. Click the View Script button to view, search, or copy the script. Here you can define another aggregate or select the “I am done” option.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 288: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 28

Copyright © 2008, Oracle. All rights reserved.

7. View Complete Aggregate Script

Confirmation of script creation and location

Script

7. View Complete Aggregate ScriptWhen you have finished, the wizard displays the Complete Aggregate Script dialog box, confirming that the script has been generated and stored in the location identified in an earlier step.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 289: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 29

Copyright © 2008, Oracle. All rights reserved.

8. Verify that the Script Is Created

Navigate to the directory where the file was saved and verify that the script was created as expected.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 290: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 30

Copyright © 2008, Oracle. All rights reserved.

9. Create and Run a Batch File

Create and run a batch file with the following format to drive the aggregate creation process:

nqcmd Oracle BI Server command utility-d Oracle BI Server data source name-u Repository username-p Repository password-s Path to the create aggregate SQL script

9. Create and Run Batch FileFollow these steps to create and run a batch file to drive the aggregate creation process:

1. Create a batch file using the following format:nqcmd Oracle BI Server command utility-d Oracle BI Server data source name-u Repository username-p Repository password-s Path to the create aggregate SQL script

2. Save and close the file.3. Verify that the Oracle BI Server service is started. Oracle BI Server must be running to create

the aggregates.4. Open the command prompt and run the batch file.5. Verify that you receive the “Statement execute succeeded” message.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 291: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 31

Copyright © 2008, Oracle. All rights reserved.

10. Verify Aggregates in the Physical Layer

Verify that the aggregates are created in the Physical layer of the repository as expected.

Fact aggregate

Dimension aggregates

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 292: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 32

Copyright © 2008, Oracle. All rights reserved.

11. Verify Aggregates in the BMM Layer

Verify that the aggregates are created in the Business Model and Mapping layer of the repository as expected.

Fact aggregate

Dimension aggregate

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 293: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 33

Copyright © 2008, Oracle. All rights reserved.

12. Verify Aggregates in the Database

Verify that the aggregates are created in the database.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 294: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 34

Copyright © 2008, Oracle. All rights reserved.

13. Verify Results in Answers

• Activate the aggregate tables:

• Run a query in Answers:

• Check the log and verify that the aggregate tables are accessed as expected:

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 295: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 35

Copyright © 2008, Oracle. All rights reserved.

Troubleshooting Aggregate Navigation

If aggregate navigation is not working, the cause might be one of the following:• Aggregation content is not specified correctly for one or

more sources.• Aggregate dimension sources are not physically joined to

aggregate fact table sources at the same level.• Dimensional source does not exist at the same level as a

fact table source.• Aggregate dimension sources do not contain a column that

maps to the primary key of the dimension hierarchy level.• The number of elements is not specified correctly for

dimension hierarchy levels.

If Aggregate Navigation Fails to WorkThe slide lists some of the common reasons that aggregate navigation fails to work. Use this as a troubleshooting list to help identify causes and solutions.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 296: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 36

Copyright © 2008, Oracle. All rights reserved.

Considerations

Using aggregates comes with a price:• Additional time is required to build and load these tables.• Additional storage is necessary.

Build only the aggregates you need:• Look at query patterns and build aggregates to speed up

common queries that require summarized results.• Ensure that enough data is combined to offset the cost of

building aggregates.• Monitor and adjust to account for changing query patterns.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 297: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 37

Copyright © 2008, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to:• Describe aggregate tables and their purpose in dimensional

modeling• Model aggregate tables• Use the Aggregate Persistence Wizard to create aggregates

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 298: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 38

Copyright © 2008, Oracle. All rights reserved.

Practice 9-1 Overview: Using Aggregate Tables

This practice covers the following topics:• Importing aggregate tables• Creating keys and joins for aggregate tables• Creating logical table sources for aggregate tables• Specifying aggregate content

Practice 9-1 Overview: Using Aggregate TablesABC wants to add sources that contain precomputed aggregations. You need to specify the level of aggregation for each source using logical levels. The database administrator for ABC has already created the necessary aggregate tables:• D1_SALESREPS contains one row for each sales representative, which can be considered an

aggregation of the Customer dimension to the Sales Rep level.• MONTHS contains one row for each year and month combination, which can be considered an

aggregation of the Period dimension to the Month level.• D1_ORDER_AGG1 contains sales facts aggregated to the Customer.Sales Rep level,

Product.Type level, and Period.Month level.• D1_PRODUCT_TYPE is already part of your model and contains one row for each product type,

which can be considered an aggregation of the Product dimension to the Type level.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 299: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 9 - 39

Copyright © 2008, Oracle. All rights reserved.

Practice 9-2 Overview: Using the Aggregate Persistence Wizard

This practice covers using the Aggregate Persistence Wizard to automate the creation of aggregate tables and their corresponding objects in the repository.

Practice 9-2 Overview: Using the Aggregate Persistence WizardThe traditional process for creating aggregates for Oracle BI Server queries is manual. It can be tedious, requiring complicated DDL and DML scripts to be written for creating tables in the databases involved. Additionally, these aggregated tables need to be mapped into the repository metadata to be available for queries. This is a time-consuming and, possibly, error-prone process.The Aggregate Persistence Wizard enables an administrator to automate the creation of aggregate tables and their corresponding objects in the repository. Recall that your repository contains an aggregate table called D1_ORDER_AGG1, which contains sales fact data aggregated at the month, sales representative, and product type levels, and corresponding Product Type, Sales Rep, and Months dimension aggregate tables. In this practice, you use the Aggregate Persistence Wizard to create similar aggregate tables and the corresponding metadata.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 300: Student Guide OBIEE 1

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 301: Student Guide OBIEE 1

Copyright © 2008, Oracle. All rights reserved.

Using Partitions and Fragments

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 302: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 2

Copyright © 2008, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to:• Identify reasons for segmenting data • Describe techniques to model partitions• Implement a value-based partition• Implement a fact-based partition

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 303: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 3

Copyright © 2008, Oracle. All rights reserved.

Business Challenge

• Data is often partitioned into multiple physical sources for a single logical table.

• Organizations need to seamlessly and efficiently access and process data from multiple sources to satisfy user requests.

• Business applications must “know” where to go for what type of data and under what conditions.

Business ChallengeData is often partitioned into multiple physical sources for a single logical table in a business model. When a logical table source does not contain the entire set of data at a given level, you need to specify the portion or fragment of the set that it contains. For example, there are situations where data may be fragmented or partitioned. When individual sources at a given level contain information for a portion or fragment of the domain, an application needs to know the content of the sources to pick the appropriate source for the query. Seamless and efficient access from the users’ perspective is the goal.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 304: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 4

Copyright © 2008, Oracle. All rights reserved.

Business Solution: Oracle BI Server

• Oracle BI repository can be configured so that Oracle BI Server handles the navigation to the appropriate source.

• Oracle BI Server seamlessly and efficiently accesses and processes data from multiple sources to satisfy user requests.

Business Solution: Oracle BI ServerWhen there are multiple sources, the metadata can be built so that Oracle BI Server handles the navigation to the appropriate source. Oracle BI Server can seamlessly access and process data from multiple sources efficiently to satisfy users’ requests. For example, as you saw in the previous lesson titled “Using Aggregates,” a database administrator may create an aggregate table to improve performance. The metadata must be configured correctly so that Oracle BI Server knows when it is appropriate to access the aggregate table instead of the detailed table when satisfying a user’s request.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 305: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 5

Copyright © 2008, Oracle. All rights reserved.

Partition

• Is a database element that contains part of the data for a fact or a dimension

• Combines with other data fragments as necessary • May be:

– Fact-based– Value-based– Level-based– Complex

PartitionA partition typically contains a subset of the data for a fact or dimension. A partition is the division of a database or its elements into distinct independent parts. Database partitioning is done for manageability, performance, or availability reasons. Partitioning can be done by building separate smaller databases or by splitting larger selected elements into smaller ones. For example, splitting one large table into many smaller tables. When a user requests data, it may be necessary to consolidate data from different partitions to complete the request.There are different partition types: fact-based, value-based, level-based, and complex. Each is discussed in detail in the slides that follow.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 306: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 6

Copyright © 2008, Oracle. All rights reserved.

Partitioning by Fact

• Data is partitioned by fact when different fact data is stored in different tables.

• Example: Actual sales versus quota targets

1000

Product Sale

1100

Sales Rep

2000

Product Quota

1100

Sales Rep

Actual sales Quota targets

Partitioning by FactData may be stored in such a way that different facts are in different tables. For example, companies usually store sales quotas in tables separate from the actual sales history. Inventory data is also commonly found stored in a database separate from sales history. This is sometimes referred to as vertical partitioning because a theoretical all-encompassing fact table can be thought to be sliced “vertically,” with different columns going to different fact tables.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 307: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 7

Copyright © 2008, Oracle. All rights reserved.

Partitioning by Value

• Data is partitioned by value when the data is split into separate tables according to the values of the data.

• Example: Invoice data is stored separately for each region.

1000

Dollars

Central1135293

RegionInvNbrInvoices for Central Region

Invoices for West

Region 200

Dollars

West114444

RegionInvNbr

Partitioning by ValueData can also be partitioned into separate tables according to the values of the data. For example:

• East Region sales data may be in a different table from West Region sales data.• Inventory data may be in separate tables segregated by warehouse.• The data for the current year may not be in the same table as the data for prior years, or data

could be separated by month, so that the last three years of data are in 36 separate tables. This type of partitioning creates complexity in the query environment. Not only is the table population increased, thereby creating another query navigation issue, but any user who seeks to answer a question such as “What is the total number of widgets in inventory?” has to query multiple tables and then consolidate the results. One of the important benefits of Oracle BI Server is that it can do this type of navigation and consolidation automatically, preserving a simple logical model of the data for the user to interact with.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 308: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 8

Copyright © 2008, Oracle. All rights reserved.

Partitioning by Level

• Data is partitioned by level when the same facts are stored in separate tables at different levels of aggregation.

• Example: Detailed sales data is summarized and stored by year and region.

199810101998100119980105

Date

10000110025000110010000

Product Sale

1100

Sales Rep

Sales detailed data Sales by year and region

Central3000001999200000

Total Dollars

Central1998

RegionYear

Partitioning by LevelData may also be partitioned by level. This occurs when the same facts are stored in separate tables at different levels of aggregation. You saw examples of this in the previous lesson. The use of aggregate tables is a common practice in data warehouse design because it is a very effective tool for improving query performance. Theoretically, however, the number of aggregate tables in a data warehouse can get very large. As such, data warehouse designers prefer to follow an incremental approach to creating aggregations. They look for the best performance, creating the aggregate tables that are going to be used most frequently and that offer the most data compression, that is, where the row counts decrease the most. Of course, aggregate fact tables invite aggregate dimension tables. The result is that while introducing aggregate tables goes a long way toward improving query performance, it also complicates the overall query environment. One of the important benefits of Oracle BI Server is that it is “aggregate aware.” It writes SQL to use an efficient aggregate table automatically, while preserving a simple logical model of the data for the user to interact with. The user, therefore, remains insulated from the actual aggregate navigation process and sees only the query results.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 309: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 9

Copyright © 2008, Oracle. All rights reserved.

Complex Partitioning

• Data is partitioned using more than one technique.• Example: Invoice sales data is partitioned by value and level.

Central2500019980210000

Total Dollars

Central199801

RegionMonth

Invoices by month for Central Invoices by year for Central

200000

Total Dollars

Central1998

RegionYear

Invoices by month for West Invoices by year for West

West350000199802300000

Total Dollars

West199801

RegionMonth

3000000

Total Dollars

West1998

RegionYear

Complex PartitioningPartitioning strategies can be mixed. For example, data may be partitioned by level and value so that at any given intersection of levels, multiple aggregate tables may exist. Moreover, at any given intersection of levels, not all values might be stored. For example, at a Brand, Month, and Market aggregate level, just the important brands might be stored. Certain queries at this level can use the aggregate tables; other queries, with different constraints, would have to use more detailed tables. Oracle BI Server also navigates complex partitions for the user.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 310: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 10

Copyright © 2008, Oracle. All rights reserved.

ABC Example: Value-Based (Customer)

Replace the current, single source for customer data with two value-based partitions.

Clifton Lunch

Name

1000

NewKeyCustomers with names

starting with letters

A–M

Customers with names

starting with letters

N–ZTong’s Wok

Name

1002

NewKey

ABC Example: Value-Based (Customer)ABC wants to implement separate partitions for customer data. One partition will store data for A–M customers, the other stores data for N–Z customers.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 311: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 11

Copyright © 2008, Oracle. All rights reserved.

ABC Example: Fact-Based (Quota)

Allow users to query for actual sales data and quota data in a single query.

1000

Product Sale

1100

Sales Rep

2000

Product Quota

1100

Sales Rep

Actual sales Quota targets

ABC Example: Fact-Based ABC sets sales quotas for its sales organization. These quotas are set at the region level by quarter. In addition, each of the region sales quotas is broken down by product type. Quota numbers are stored in an Excel workbook. You incorporate the quota numbers in the business model and create business measures to report variance from quota and percent of quota.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 312: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 12

Copyright © 2008, Oracle. All rights reserved.

ABC Example: Value-Based (Inventory)

Build a business model for inventory data that is fragmented into multiple tables.

Eight quarters of inventory data stored in eight

separate tables

ABC Example: Value-Based (Inventory) ABC’s inventory data is fragmented; that is, it is split into multiple tables. Data values determine which table contains what data. In this example, eight quarters of inventory data are stored in eight separate tables. You need to create a business model for this fragmented inventory data.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 313: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 13

Copyright © 2008, Oracle. All rights reserved.

Implementation Steps

• Import physical sources.• Create physical joins.• Add sources to the Business Model and Mapping layer.• Specify fragmentation content.• Test the results.

New step

Implementation Steps Most of the steps listed here should be familiar by now. The only new step is specifying fragmentation content, which is discussed in detail in the next slide.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 314: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 14

Copyright © 2008, Oracle. All rights reserved.

Specify Fragmentation Content

• Use the Expression Builder to define the type of content that the fragment contains.

• Set the flag to specify whether to combine this fragment with other data.

Specifies that customer data from A–M is

contained in this fragment

Specifies combining this fragment with the other

Specify Fragmentation ContentWhen a logical table source does not contain the entire set of data at a given level, you need to specify the portion, or fragment, of the set that it contains. Describe the content in terms of logical columns, using the “Fragmentation content” edit box on the Content tab of the Logical Table Source window. Click the ellipsis next to the “Fragmentation content” box to open the Expression Builder to build the expression. This is similar to the steps used to define aggregates. For aggregates, you specified the content using the level indicator. Here you use an expression to serve the same purpose—to identify what data the source contains. In this example, the D1_CustAtoM table contains the customer data for all customers whose names start with the letters A through M. In a request for customer data, this source may need to be combined with data from other sources at this level. In this example, that would be the D1_CustNtoZ table, which contains rest of the customer data.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 315: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 15

Copyright © 2008, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to:• Identify reasons for segmenting data • Describe techniques to model partitions• Implement a value-based partition• Implement a fact-based partition

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 316: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 16

Copyright © 2008, Oracle. All rights reserved.

Practice 10-1 Overview: Modeling a Value-Based Partition

This practice covers the following topics:• Creating a partition• Defining fragmentation content for a value-based partition

Practice 10-1 Overview: Modeling a Value-Based Partition ABC wants to implement separate partitions for customer data. One partition stores data for customers A–M, the other stores data for customers N–Z.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 317: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 17

Copyright © 2008, Oracle. All rights reserved.

Practice 10-2 Overview: Modeling a Fact-Based Partition

This practice covers modeling a fact-based partition for quota data.

Practice 10-2 Overview: Modeling a Fact-Based Partition ABC sets sales quotas for its sales organization. These quotas are set at the region level by quarter. In addition, each of the region sales quotas is broken down by product type. Quota numbers are stored in an Excel workbook. The quota.xls workbook is stored on your machine. You incorporate the quota numbers in the business model and create business measures to report variance from quota and percent of quota.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 318: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 18

Copyright © 2008, Oracle. All rights reserved.

Practice 10-3 Overview:Using the Calculation Wizard to

Create Derived MeasuresThis practice covers creating measures for the quota partition.

Practice 10-3 Overview: Using the Calculation Wizard to Create Derived Measures Use the Calculation Wizard to create two derived measures: Variance from Quota and Percent of Quota.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 319: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 10 - 19

Copyright © 2008, Oracle. All rights reserved.

Practice 10-4 Overview: Modeling Fragmented Inventory Data

This practice covers defining fragmentation content for inventory data.

Practice 10-4 Overview: Modeling Fragmented Inventory Data ABC’s inventory data is fragmented; that is, it is split into multiple tables. Data values determine which table contains what data. In this example, eight quarters of inventory data are stored in eight separate tables. You need to create a business model for this fragmented inventory data.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 320: Student Guide OBIEE 1

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 321: Student Guide OBIEE 1

Copyright © 2008, Oracle. All rights reserved.

Using Repository Variables

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 322: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 2

Copyright © 2008, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to:• Create session variables• Create repository variables• Create initialization blocks • Implement a dynamic repository variable

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 323: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 3

Copyright © 2008, Oracle. All rights reserved.

Variables

• Contain values in memory that are used by Oracle BI Server during its processing

• Are created and managed using the Variable Manager feature in the Administration Tool

• Consist of two classes:– Session variables– Repository variables

VariablesYou can use variables in a repository to streamline administrative tasks and modify metadata content dynamically to adjust to a changing data environment. A repository variable has a single value at any point in time. Repository variables can be used instead of literals or constants in the Expression Builder in the Administration Tool. Oracle BI Server substitutes the value of the repository variable for the variable itself in the metadata.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 324: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 4

Copyright © 2008, Oracle. All rights reserved.

Variable Manager

Is a utility in the Administration Tool that is used to define variables.

Variable ManagerYou can use the Variable Manager to define variables. The Variable Manager dialog box has two panes. The left pane displays a tree that shows variables and initialization blocks, and the right pane displays details of the item you select in the left pane. The left pane is divided into repository variables and initialization blocks, and session variables and initialization blocks. Select Manage > Variables to access the Variable Manager.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 325: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 5

Copyright © 2008, Oracle. All rights reserved.

Variable Types

Repository:• Static• Dynamic

Session:• System• Non-system

Variable TypesThere are two classes of variables: repository variables and session variables.

• A repository variable has a single value at any point in time. There are two types of repository variables: static and dynamic. Repository variables are represented by a question mark icon.

• Session variables are created and assigned a value when each user logs on. There are two types of session variables: system and non-system. System and non-system variables are represented by a question mark icon.

Initialization blocks are used to initialize dynamic repository variables, system session variables, and non-system session variables. The icon for an initialization block is a cube labeled “i.”Each of these components is discussed in detail in the slides that follow.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 326: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 6

Copyright © 2008, Oracle. All rights reserved.

Repository Variables

• Persist from the time Oracle BI Server is started until it is shut down

• Can be used instead of literals or constants in the Expression Builder in the Administration Tool

• Exist in two forms:– Static– Dynamic

Repository VariablesA repository variable has a single value at any point in time. Repository variables can be used instead of literals or constants in the Expression Builder in the Administration Tool. Oracle BI Server substitutes the value of the repository variable for the variable itself in the metadata. There are two types of repository variables: static and dynamic. These are discussed in detail in the slides that follow.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 327: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 7

Copyright © 2008, Oracle. All rights reserved.

Static Repository Variables

• Are repository variables whose values are constant and do not change while Oracle BI Server is running

• Have values that are initialized in the Static Repository Variable dialog box

Static value

Static Repository VariablesThe value of a static repository value is initialized in the Default Initializer field in the Static Repository Variable dialog box. This value does not change until an Oracle BI Server administrator decides to change it. Values are initialized once and remain constant. An example of a static value is the last time data was loaded (to represent how current the analytical information is).To create a new static repository variable:

1. Select Repository > Variables > Static in the left pane.2. Right-click in the right pane and select New Repository Variable.3. Enter variable values in the dialog box.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 328: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 8

Copyright © 2008, Oracle. All rights reserved.

Dynamic Repository VariablesHave values that are refreshed by data returned from queries in initialization blocks

Dynamic variables associated with

initialization block

Refreshed by query in

initialization block

Query refreshes variables.

Refresh schedule.

Dynamic Repository VariablesYou initialize dynamic repository variables in the same way as static variables, but the values are refreshed by data returned from queries. When defining a dynamic repository variable, you create an initialization block or use a preexisting one that contains a SQL query. You also set up a schedule that Oracle BI Server follows to execute the query and refresh the value of the variable periodically. When the value of a dynamic repository variable changes, all cache entries associated with a business model that reference the value of that variable are purged automatically. Each query can refresh several variables—one variable for each column in the query. In this example, the query returns three columns that refresh three variables: CurrentDay, CurrentMonth, and CurrentYear.A common use of these variables in Answers is to set column filters. For example, to filter a column on the value of the dynamic repository variable CurrentMonth, set the filter to the variable CurrentMonth.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 329: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 9

Copyright © 2008, Oracle. All rights reserved.

Session Variables

• Persist only while a user’s session is active• Receive values when users establish their sessions• Exist in two forms:

– System– Non-system

Session Variables Session variables are like dynamic repository variables in that they obtain their values from initialization blocks. Unlike dynamic repository variables, however, the initialization of session variables is not scheduled. When a user begins a session, Oracle BI Server creates new instances of session variables and initializes them. Unlike a repository variable, there are as many instances of a session variable as there are active sessions on Oracle BI Server. Each instance of a session variable could be initialized to a different value. A session is an instance of a user running the client application. The session starts when a user opens the application and ends when the user closes it. The types of session variables are discussed in detail in the following slides.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 330: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 10

Copyright © 2008, Oracle. All rights reserved.

System Session Variables

Are predefined session variables used by Oracle BI Server for specific purposes, such as authenticating users

Session variables associated with

initialization block

Refreshed by query in initialization

block

Query refreshes variables.

System Session VariablesSystem session variables are session variables that Oracle BI Server and Oracle BI Presentation Services use for specific purposes. System session variables have reserved names, which cannot be used for other kinds of variables. An example is USER, which holds the value the user entered as his or her logon name. Another example is GROUP, which contains the group that a user belongs to.System session variables are primarily used when authenticating users against external sources such as database tables or Lightweight Directory Access Protocol (LDAP) servers. If a user is authenticated successfully, session variables can be used to set filters and permissions for that session.In this example, the initialization block query requests values for four columns in a security table based on username and password. The values are used to refresh the GROUP, DISPLAYNAME, USER, and LOGLEVEL variables.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 331: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 11

Copyright © 2008, Oracle. All rights reserved.

Non-System Session Variables

Are application-specific variables that are created by the implementation team

Session variable associated with

initialization block

Refreshed by query in initialization

block Query refreshes variable.

Non-System Session VariablesUnlike system session variables, which have reserved names and are used for specific purposes, non-system session variables can be created by the Administrator to serve a purpose for a specific application. A common use for non-system session variables is setting user filters. For example, you could define a non-system variable called Region that would be initialized to the name of the user’s sales region. You could then set a security filter for all members of a group that would allow them to see only data pertinent to their region. In this example, an initialization block named Region populates the variable Region with the value East.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 332: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 12

Copyright © 2008, Oracle. All rights reserved.

Initialization Blocks• Are used to initialize system and non-system session

variables, as well as dynamic repository variables• Specify SQL to be run to populate one or more variables by

accessing data sources• Are invoked at Oracle BI Server startup and are periodically

rerun to refresh values for dynamic variables according to an established schedule

Initialization BlocksInitialization blocks are used to initialize dynamic repository variables, system session variables, and non-system session variables. An initialization block contains the SQL that is executed to initialize or refresh the variables associated with that block. Initialization blocks are invoked at Oracle BI Server startup and are periodically rerun to refresh values for dynamic variables according to an established schedule.Initialization blocks are related to repository or session variables.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 333: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 13

Copyright © 2008, Oracle. All rights reserved.

Initialization Block: Example

Determine the latest dates contained in the source data and store it in variables:

Name

Refresh schedule

Data source

Query

Variables

Initialization Block: ExampleThis slide shows an example presented earlier in this lesson in more detail.

• The name of this initialization block is CurrentPeriods. • The initialization block is scheduled to refresh every hour.• The data source is the data source identified in the SUPPLIER CP connection pool. • The SQL queries the D1_CALENDAR2 table for latest Day, Month, and Year data based on

the most recent period key in the D1_ORDERS2 table, and then populates the CurrentDay, CurrentMonth, and CurrentYear variables.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 334: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 14

Copyright © 2008, Oracle. All rights reserved.

Initialization Block Example: Edit Data SourceClick Edit

Data Source.

Enter query.

Use database-specific SQL.

Browse to select connection pool.

Test.

Initialization Block Example: Edit Data SourceThis slide shows the Repository Variable Init Block Data Source dialog box. Click the Edit Data Source button in the Initialization Block dialog box to get to this dialog box. In this dialog box, you can:

• Enter a default query or enter the query using database-specific SQL• Click the Test button to test the query• Click the Browse button to select the connection pool

The SQL must reference physical tables that can be accessed using the connection pool specified in the Connection Pool field. If you want the query for an initialization block to have database-specific SQL, you can select a database type for that query. If a SQL initialization string for that database type has been defined when the initialization block is instantiated, this string is used. Otherwise, a default initialization SQL string is used. When you create SQL and submit it directly to the database, bypassing Oracle BI Server (for example, when creating initialization blocks), you should test the SQL using the Test button. If the SQL contains an error, the database returns an error message.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 335: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 15

Copyright © 2008, Oracle. All rights reserved.

Initialization Block Example: Edit Data Target

Click Edit Data Target.

Create new variables.

Arrange variables.

Edit variables.

Remove variables.

Initialization Block Example: Edit Data TargetThis slide shows the Initialization Block Variable Target dialog box. Click the Edit Data Target button in the Initialization Block dialog box to get to this dialog box. In this dialog box, you can:

• Create new variables• Use Up and Down buttons to rearrange variable order. The order of the variables must

match the order of the corresponding columns in the initialization block SQL query.• Remove variables• Edit variables

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 336: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 16

Copyright © 2008, Oracle. All rights reserved.

ABC Example

Use a variable to dynamically determine which set of customer data is in which partition and use it to specify the fragmentation content instead of hard-coding it as A–M and N–Z.

Clifton Lunch

Name

1000

NewKeyFragment 1 will contain

half the data.

Fragment 2 will contain

the remaining

data.Tong’s Wok

Name

1002

NewKey

Names will start with A but end is unknown.

Names will end with Z but start is unknown.

ABC ExampleABC has implemented separate partitions for customer data. However, when the partitions are reloaded, 50% of the data is loaded into the first partition and 50% of the data into the second partition. The variable determines how the data is split between the partitions. This example assumes that the source of data is refreshed periodically and, therefore, the contents in each fragment may be different.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 337: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 17

Copyright © 2008, Oracle. All rights reserved.

Implementation Steps

1. Open the Variable Manager.2. Create an initialization block.3. Edit the data source.4. Edit the data target.5. Test the initialization block query.6. Use the variable to determine content.7. Verify the initialization.

Implementation StepsThis slide lists the high-level steps for implementing the ABC example. Each step is discussed in detail in the slides that follow.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 338: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 18

Copyright © 2008, Oracle. All rights reserved.

1. Open the Variable Manager

In the Administration Tool, select Manage > Variables.

1. Open the Variable ManagerIn the Administration Tool, select Manage > Variables to open the Variable Manager.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 339: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 19

Copyright © 2008, Oracle. All rights reserved.

2. Create an Initialization Block

In the Variable Manager, select Action > New > Repository > Initialization Block to open the Repository Variable Init Block dialog box.

2. Create an Initialization BlockIn the Variable Manager, select Action > New > Repository > Initialization Block to open the Repository Variable Init Block dialog box. Enter CustomerDataSplit as the name for the repository variable initialization block.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 340: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 20

Copyright © 2008, Oracle. All rights reserved.

3. Edit the Data Source

Click the Edit Data Source button to navigate to the Repository Variable Init Block Data Source dialog box.

Enter the SQL code.

Browse to select connection pool.

3. Edit the Data SourceEnter the SQL code in the Default Initialization String field to capture the first letter of the maximum customer name in the D1_CUSTATOM table.Browse to select the SUPPLIER CP connection pool for the SUPPLIER2 schema.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 341: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 21

Copyright © 2008, Oracle. All rights reserved.

4. Edit the Data Target

Click the Edit Data Target button to navigate to the Repository Variable Init Block Variable Target dialog box.

Create variable.

4. Edit the Data TargetCreate a variable called EndPartOne, which will be refreshed by the initialization block SQL. Specify 'A' as the default initializer. For repository variables, when you open a repository in online mode, the value shown in the Default Initializer column of the Initialization Block Variables tab is the current value of that variable as known to Oracle BI Server.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 342: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 22

Copyright © 2008, Oracle. All rights reserved.

5. Test the Initialization Block Query

Click the Edit Data Source button to navigate to the Repository Variable Init Block Data Source dialog box.

5. Test the Initialization Block QueryReturn to the Repository Variable Init Block Data Source dialog box and click the Test button to test the initialization block query.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 343: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 23

Copyright © 2008, Oracle. All rights reserved.

6. Use the Variable to Determine Content

Use the variable to dynamically determine the content in a fragmentation expression.

Selecting the variable in Expression Builder adds the VALUEOF function automatically.

6. Use the Variable to Determine ContentRepository variables are available in the Repository Variables folder in the Expression Builder. Use the Expression Builder to add the variable to a formula in the Fragmentation content field of the CustPartOne and CustPartTwo logical table sources. Only CustPartOne is shown here. This expression returns all customers whose names are less than or equal to the value of EndPartOne, which is the first letter of the maximum customer name in the D1_CUSTATOM table. CustPartTwo returns all customers whose names are greater than the value of EndPartOne.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 344: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 24

Copyright © 2008, Oracle. All rights reserved.

7. Verify the Initialization

Check the query log to verify that the variable is initialized and is used properly on Oracle BI Server startup.

7. Verify the InitializationIf you stop and restart Oracle BI Server, the server automatically executes the SQL in repository variable initialization blocks, reinitializing the repository variables.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 345: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 25

Copyright © 2008, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to:• Create session variables• Create repository variables• Create initialization blocks • Implement a dynamic repository variable

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 346: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 26

Copyright © 2008, Oracle. All rights reserved.

Practice 11-1 Overview: Creating Dynamic Repository Variables

This practice covers the following topics:• Creating a repository variable initialization block• Creating a dynamic repository variable• Testing an initialization block• Using a variable to dynamically determine fragmentation

content

Practice 11-1 Overview: Creating Dynamic Repository VariablesABC has implemented separate partitions for customer data. However, instead of hard-coding the data in the partitions, when the partitions are reloaded, 50% of the data is loaded into the first partition and 50% of the data into the second partition. You create an initialization block and a dynamic repository variable, and then use the variable to determine how the data is split between the partitions.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 347: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 11 - 27

Copyright © 2008, Oracle. All rights reserved.

Practice 11-2 Overview: Using Dynamic Repository Variables as Filters

This practice covers the following topics:• Creating a repository variable initialization block• Creating a dynamic repository variable• Testing an initialization block• Using dynamic repository variables as filters

Practice 11-2 Overview: Using Dynamic Repository Variables as FiltersRather than creating hard-coded column filters such as Year = 1999 in Answers requests, ABC wants to use variables that always return the current year, current month, and current day. You create these dynamic repository variables and then use them in column filters in Oracle BI Answers.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 348: Student Guide OBIEE 1

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 349: Student Guide OBIEE 1

Copyright © 2008, Oracle. All rights reserved.

Modeling Time Series Data

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 350: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 12 - 2

Copyright © 2008, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to:• Describe the use of time comparisons for business analysis• Implement time comparison measures in the business model

using the time series functions

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 351: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 12 - 3

Copyright © 2008, Oracle. All rights reserved.

Time Comparisons

Provide the ability to compare business performance with prior time periods.

Sales – This Year Sales – Last Year

How do they compare?

Time ComparisonsThe ability to compare business performance with previous time periods is fundamental to understanding a business. Time comparisons allow businesses to analyze data that spans multiple time periods, providing a context for the data. Here is an example:Question: What are the sales so far this year?Answer: $50 millionQuestion: Is that good?You need to ask three separate questions to answer the question, “Is that good?”

• What are this year’s sales?• What was last year’s sales?• How do they compare?

A business needs to make these comparisons across multiple time periods. For example, how do current sales compare to sales a year ago, a quarter ago, a month ago, and so on?

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 352: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 12 - 4

Copyright © 2008, Oracle. All rights reserved.

Business Challenge: Time Comparisons

There is no direct way in SQL to make time comparisons.

What was this year’s sales?

What was last year’s sales?

How do they compare?

Query 1:

Query 2:

Query 3:

Requires three different queries to get the result

Business Challenge: Time ComparisonsAs Ralph Kimball states, SQL was not designed to make straightforward comparisons over time. There is no direct way in SQL to make time comparisons:“The most difficult area of data warehousing is the translation of simple business analyses into SQL. SQL was not designed with business reports in mind. SQL was really an interim language designed to allow relational table semantics to be expressed in a convenient and accessible form, and to enable researchers and early developers to proceed with building the first relational systems in the mid-1970s. How else can you explain the fact that there is no direct way in SQL to compare this year to last year?” – Ralph Kimball

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 353: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 12 - 5

Copyright © 2008, Oracle. All rights reserved.

Oracle BI Solution: Model Time Comparisons

Use the Oracle BI repository to model time series data.

User makes one request for all three queries using time

comparison measures.

What was this year’s sales?

What was last year’s sales?

How do they compare?

Query 1:

Query 2:

Query 3:

Oracle BI Solution: Model Time ComparisonsThe solution is to model time series data in the Oracle BI repository. This allows users to make one request for the desired result. Oracle BI Server runs multiple queries in parallel to get the results. The queries that run in the background to support the time measure are transparent to the user.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 354: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 12 - 6

Copyright © 2008, Oracle. All rights reserved.

Oracle BI Solution: Time Series Functions

Oracle BI Server provides Ago and ToDate functions for time series comparisons:• Ago function

– Calculates aggregated value as of some time period shifted from the current time

• ToDate function – Aggregates a measure attribute from the beginning of a

specified time period to the currently displayed time

Oracle BI Solution: Time Series FunctionsOracle BI Server provides logical SQL constructs that are useful for time-related aggregations: Ago and ToDate. Both these functions operate on measures. The Ago function calculates the aggregated value as of some time period shifted from the current time. For example, the Ago function can assist in creating queries that produce sales for every month of the current quarter, along with the corresponding sales from a quarter ago.The ToDate function is used to aggregate a measure attribute from the beginning of the specified time period to the currently displayed time. For example, the ToDate function can calculate Year to Date sales on a quarterly, monthly, or weekly basis.Use the Expression Builder to apply the functions.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 355: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 12 - 7

Copyright © 2008, Oracle. All rights reserved.

ABC Example

ABC wants to implement new measures in the business model to compare dollar performance this month to performance a month ago.• Show dollars a month ago.• Show change in dollars.• Show change as percentage.• Show change to date.

It was a change of 9%.

In February, dollars increased compared to the previous month.

Change to date

ABC ExampleUsers are able to select columns that show this month’s dollar performance compared with last month’s and calculate the change and percentage of change. Users can also display a running total of dollars on a month-to-month basis.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 356: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 12 - 8

Copyright © 2008, Oracle. All rights reserved.

Steps to Model Time Series Data

1. Identify time dimension and chronological keys.2. Create the Ago measure.3. Use existing columns to create additional Ago measures.4. Create the ToDate measure.5. Add new measures to the Presentation layer.6. Test the results in Answers.

Steps to Model Time Series DataThese are the high-level steps to model time series data for the ABC example. Each step is covered in detail in the slides that follow.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 357: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 12 - 9

Copyright © 2008, Oracle. All rights reserved.

1. Identify Time Dimension and Chronological Keys

1. Identify Time Dimension and Chronological KeysIn the ABC example, the first step is to identify the PeriodsDim dimension as the time dimension and specify that the level keys are chronological keys. The time series functions use this information to perform the required calculations.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 358: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 12 - 10

Copyright © 2008, Oracle. All rights reserved.

2. Create the Ago Measure

Use the Expression Builder to build the Ago function with the form Ago(<measure>,<time level>,<number to shift>).

Time series functions

Time dimensions

Ago function formula

2. Create the Ago MeasureCreate a new logical column and then use the Expression Builder to build the Ago function. In this example, Dollars is the measure, Month is the time level, and 1 is the time period you want to shift. In this case, the Ago function calculates the Dollars value a month prior to the current month. The slide also shows the Time Dimensions folder in the Expression Builder. This folder is available only if a dimension has been identified as a time dimension, as shown in the previous slide.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 359: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 12 - 11

Copyright © 2008, Oracle. All rights reserved.

3. Use Existing Columns to Create Additional Ago Measures

Use the existing Ago measure to build Change and Percent Change measures.

Change Month Ago

Dollars

Percent Change Month Ago

Dollars

3. Use Existing Columns to Create Additional Ago MeasuresUse existing Ago measures to build additional Ago measures, such as Change Ago and Percent Change Ago. In these example, the Month Ago Dollars measure is used to calculate the change in dollars between the current month and the previous month, and the percentage change in dollars between the current month and the previous month. Note that you could use the Calculation Wizard to create these measures.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 360: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 12 - 12

Copyright © 2008, Oracle. All rights reserved.

4. Create the ToDate Measure

Use the Expression Builder to build the ToDate function with the form ToDate(<measure>,<time level>).

Time series functions

Time dimensions

ToDate formula

4. Create the ToDate MeasureCreate a new logical column and then use the Expression Builder to build the ToDate function. In this example, Dollars is the measure and Year is the time level. The ToDate function calculates the Dollars measure from the beginning of the year to a specified time. For example, a query with the Month as the criteria and a Month ToDate measure would return dollars calculated from the beginning of the year to the specified Month.The slide also shows the Time Dimensions folder in the Expression Builder. This folder is available only if a dimension has been identified as a time dimension, as shown in an earlier slide.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 361: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 12 - 13

Copyright © 2008, Oracle. All rights reserved.

5. Add New Measures to the Presentation Layer

Add new time series measures to the Presentation layer so that users can include them in query criteria.

5. Add New Measures to the Presentation LayerUse known techniques to add new Ago and ToDate time series measures to the Presentation layer so that users can include the measures in query criteria. In this example, four new measures have been added:

• Month Ago Dollars• Change Month Ago Dollars• Percent Change Month Ago Dollars• Year To Date Dollars

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 362: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 12 - 14

Copyright © 2008, Oracle. All rights reserved.

6. Test the Results in Answers

Create requests in Answers and verify the results.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 363: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 12 - 15

Copyright © 2008, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to:• Describe the use of time comparisons for business analysis• Implement time comparison measures in the business model

using the time series functions

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 364: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 12 - 16

Copyright © 2008, Oracle. All rights reserved.

Practice 12-1 Overview: Creating Time Series Comparison Measures

This practice covers using Oracle BI Ago and ToDate functions to build time series comparison measures.

Practice 12-1 Overview: Creating Time Series Comparison MeasuresYou use the Oracle BI Ago and ToDate functions to create new measures and calculations to enable users to compare dollar performance this month with that a month ago and calculate the dollar change, the percentage of dollar change, and the to date dollar change. You then add the new measures to the presentation catalog and test the comparison measures using Answers.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 365: Student Guide OBIEE 1

Copyright © 2008, Oracle. All rights reserved.

Modeling Many-to-Many Relationships

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 366: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 2

Copyright © 2008, Oracle. All rights reserved.

Objective

After completing this lesson, you should be able to use bridge tables and helper tables to model many-to-many relationships in an Oracle BI repository.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 367: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 3

Copyright © 2008, Oracle. All rights reserved.

Business Challenge and Solution

• Dimensional star schemas are ideal for modeling a business when one-to-many relationships exist between the dimension tables and fact tables.

• Challenge: It is often necessary to model many-to-many relationships between dimension tables and fact tables.

• Solution: Use a bridge table and helper tables to model many-to-many relationships.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 368: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 4

Copyright © 2008, Oracle. All rights reserved.

Bridge Table

• Resolves many-to-many relationships between dimension tables and fact tables

• Stores multiple records corresponding to a dimension• Contains a weight factor column representing the ratio of the

many-to-many relationship– For example, if two sales representatives are associated with

a given sales commission, the weight factor would be 0.50.– Multiplying the weight factor by the commission amount yields

each sales representative’s share of the commission.– More complex weight factors can be used (for example, 0.50,

0.25, 0.25) as long as the sum of all factors is 1.

Bridge TableWhen you need to model many-to-many relationships between dimension tables and fact tables, you can create a bridge table that resides between the fact and the dimension tables. A bridge table stores multiple records corresponding to that dimension.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 369: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 5

Copyright © 2008, Oracle. All rights reserved.

ABC Example

• Each sales representative may participate in many deals that pay commission.

• Each deal may include many sales representatives who split the commission.

• A bridge table is required to model this many-to-many relationship between the commission fact table and the sales representative dimension table.

Commission Fact

Commission KeyOther Foreign KeysCommission Fact

Commission KeySales Rep KeyWeight Factor

Sales Rep KeySales Rep Data

Bridge table Sales Rep Dimension

ABC ExampleIn the example for this lesson, you model a bridge table to resolve a many-to-many relationship between a commission fact table and a sales representative dimension table.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 370: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 6

Copyright © 2008, Oracle. All rights reserved.

Steps to Model a Bridge Table

1. Import tables.2. Create the physical model.3. Create the logical model.4. Map the bridge table.5. Create a calculation measure.6. Map objects to the Presentation layer.7. Verify the results.

Steps to Model a Bridge TableThis slide identifies the steps needed to model a bridge table in an Oracle BI repository. Each step is presented in detail in the following slides.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 371: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 7

Copyright © 2008, Oracle. All rights reserved.

1. Import Tables

Use known techniques to import the commission fact and commission bridge tables to the Physical layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 372: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 8

Copyright © 2008, Oracle. All rights reserved.

2. Create the Physical Model

Use the bridge table to model a many-to-many relationship between the commission fact and the sales representative dimension in the Physical layer.

Bridge table

Commission fact table

Sales rep dimension table

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 373: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 9

Copyright © 2008, Oracle. All rights reserved.

3. Create the Logical Model

Use known techniques to build the logical model.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 374: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 10

Copyright © 2008, Oracle. All rights reserved.

4. Map the Bridge Table

Map the fact logical table source to the bridge table.

Bridge table

Logical table source maps to multiple physical sources.

Join

4. Map the Bridge TableMapping the fact logical table source to the bridge table avoids the need for snowflaking in the Business Model and Mapping layer. In the example, two tables are added to one logical table source in the Business Model and Mapping layer. If the bridge table had been added to the business model as a separate logical table, it would have been necessary to join the tables in a logical snowflaked schema. Using this technique of mapping the logical table source to the bridge table allows you to build models that use only star schemas.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 375: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 11

Copyright © 2008, Oracle. All rights reserved.

5. Create a Calculation Measure

Use physical columns to create a measure that calculates “commission amount” × “weight factor”.

Calculation uses physical columns from fact and bridge tables.

5. Create a Calculation MeasureIn this example, you use physical columns to create a measure that calculates the sum of the commission amount in the commission fact table multiplied by the weight factor in the bridge table.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 376: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 12

Copyright © 2008, Oracle. All rights reserved.

6. Map Objects to the Presentation Layer

Use known techniques to map objects to the Presentation layer.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 377: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 13

Copyright © 2008, Oracle. All rights reserved.

7. Verify the Results

Use Answers and query log to verify the results.

Commission is split between sales reps based on weight factor.

Calculation

Bridge table accessed

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 378: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 14

Copyright © 2008, Oracle. All rights reserved.

Helper Tables

• Are used to model many-to-many relationships for team-based hierarchies in a dimension

• Enable users to query for hierarchy data and get meaningful results at different levels of the hierarchy

• Example: – Modeling allows queries at different levels in the position

hierarchy and the ability to roll up results for managers.— Fact table: Contains measures by position— Position dimension table: Contains position hierarchy data— Position helper table: Contains position relationship data

Helper TablesHelper tables are used to model many-to-many relationships for team-based hierarchies in a dimension. Helper tables enable users to query for hierarchy data and get meaningful results at different levels of the hierarchy. For example, you have a fact table that contains measures by position, a position dimension table that contains the position hierarchy data, and a position helper table that contains data about the relationships between the positions. Modeling a helper table correctly allows users to run queries at different levels in the position hierarchy and get meaningful results. It also provides the ability to roll up results for managers.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 379: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 15

Copyright © 2008, Oracle. All rights reserved.

Position Hierarchy: Example

An employee can hold more than one position in the organization.• In this example, Anne Williams holds both the Sales Mgr 2

and Rep 4 positions.

VP Sales

Sales Mgr 1 Sales Mgr 2

Rep1 Rep 2 Rep 3 Rep 4

Alan Ziff

Andrew Taylor Anne Williams

Ann Johnson Betty Newer Anne WilliamsBarbara Jensen

Position Hierarchy: ExampleThe graphic in the slide shows a sales hierarchy example with three levels. The point here is that an employee can hold more that one position in an organization. The business model should allow results to be reported at different levels. In this example, Anne Williams should see results as both a sales manager and a sales representative.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 380: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 16

Copyright © 2008, Oracle. All rights reserved.

Position Dimension Table

Contains position hierarchy data

VP Sales

Sales Mgr 1 Sales Mgr 2

Rep1 Rep 2 Rep 3 Rep 4

Alan Ziff

Andrew Taylor Anne Williams

Ann Johnson Betty Newer Anne WilliamsBarbara Jensen

Identifies both positions for Anne Williams

Position Dimension TableA position dimension table stores information about the position hierarchy. Each position is assigned a position ID and an employee name. In this example, Anne Williams holds two positions: Sales Manager 2 and Sales Rep 4.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 381: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 17

Copyright © 2008, Oracle. All rights reserved.

Position ID

Uniquely identifies each position in the hierarchy

VP Sales

Sales Mgr 1 Sales Mgr 2

Rep1 Rep 2 Rep 3 Rep 4

Alan ZiffID = 1

Andrew TaylorID = 2

Anne WilliamsID = 3

Ann JohnsonID = 4

Betty NewerID = 6

Anne WilliamsID = 7

Barbara JensenID = 5

Each position has an ID in the hierarchy.

Position IDThe position ID column in the position dimension table uniquely identifies each position in the hierarchy.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 382: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 18

Copyright © 2008, Oracle. All rights reserved.

Sub-Position ID

• Identifies one descendant position ID:– May be the position itself, a child, a grandchild, or further

descendant– For example, the relationship between Alan Ziff and Barbara

Jensen is position ID = 1, sub-position ID = 5.

VP Sales

Sales Mgr 1 Sales Mgr 2

Rep1 Rep 2 Rep 3 Rep 4

Alan ZiffID=1

Andrew TaylorID = 2

Anne WilliamsID = 3

Ann JohnsonID = 4

Betty NewerID = 6

Anne WilliamsID = 7

Barbara JensenID = 5

Sub-Position IDSub-position ID identifies one descendant position from the position ID. This can be the position itself, a child position, a grandchild position, or further descendant. In the example in the slide, the relationship between Alan Ziff and Barbara Jensen is position ID = 1, sub-position ID = 5. The relationship between Alan Ziff and himself is position ID = 1, sub-position ID = 1.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 383: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 19

Copyright © 2008, Oracle. All rights reserved.

Position Hierarchy Gap

Indicates the number of levels between positions

VP Sales

Sales Mgr 1 Sales Mgr 2

Rep1 Rep 2 Rep 3 Rep 4

Gap = 1Gap = 2

Position Hierarchy GapThe position hierarchy gap indicates the number of levels between positions. In the example in the slide, the gap between the VP Sales position and the sales manager positions is 1. The gap between the VP Sales and the sales representative positions is 2.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 384: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 20

Copyright © 2008, Oracle. All rights reserved.

Position Helper Table

Uses position ID, sub-position ID, and gap to identify relationships in the hierarchy• For example, the relationship between Alan Ziff and Barbara

Jensen is position ID = 1, sub-position ID = 5, gap = 2.

This row records the relationship between Alan Ziff and Barbara

Jensen in the hierarchy.

This row records Alan Ziff’s

relationship to himself in the

hierarchy.

Sub-position IDPosition ID Gap

Position Helper TableThe position helper table uses the columns and relationships discussed in the previous slides (position ID, sub-position ID, and gap) to identify hierarchical relationships. The position helper table must contain one row for every relationship in the hierarchy. In the example in the slide, the relationship between Alan Ziff and Barbara Jensen is position ID = 1, sub-position ID = 5, and gap = 2. The relationship between Alan Ziff and himself is position ID = 1, sub-position ID = 1, and gap = 0.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 385: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 21

Copyright © 2008, Oracle. All rights reserved.

Using Helper Table to Model Many-to-Many Relationships

Join Sub-position ID in the helper table to Position IDin the position dimension to resolve the many-to-many relationships between person and position.

All positionsRelationship between

positions

Return Fact

Position IDOther foreign keysReturn measures

Position IDPositionSales Rep

Sub-Position IDPosition IDPositionSales RepGap

Position Dimension Position Helper

Using Helper Table to Model Many-to-Many RelationshipsTo resolve the many-to-many relationships between the person and the position, joinSub-position ID in the helper table to Position ID in the position dimension.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 386: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 22

Copyright © 2008, Oracle. All rights reserved.

Manager Alias

• Used to resolve instances in which a manager also holds a subordinate position in the hierarchy

– For example, Anne Williams holds Sales Rep 4 position with position ID = 7 and Sales Manager 2 position with position ID = 3.

• Allows roll up of subordinate facts

Return Fact

Position IDOther foreign keysReturn measures

Position IDPositionSales Rep

Sub-Position IDPosition IDPositionSales RepGap

Position Dimension Position Helper

Position IDPositionSales Rep

Manager Alias

Manager AliasYou also need to model a manager alias to resolve instances in which a manager holds more than one position in a hierarchy. This allows roll up of subordinate facts. Recall that, in this example, Anne Williams holds both the Sales Rep 4 position with position ID = 7 and the Sales Manager 2 position with position ID = 3.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 387: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 23

Copyright © 2008, Oracle. All rights reserved.

ABC Example

• Use helper table to model position hierarchy data.• Enable users to query for product return data and get

meaningful results at different levels of the hierarchy.

ABC ExampleIn the example for this lesson, you use a helper table and a manager alias to model position hierarchy data so that users can query for product return data and get meaningful results at different levels of the hierarchy. Note in the screenshot that results for Anne Williams are displayed at both the sales manager and sales representative levels.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 388: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 24

Copyright © 2008, Oracle. All rights reserved.

Steps to Model a Helper Table

1. Create helper table.2. Build physical model.3. Build logical model.4. Map logical table source.5. Build the Presentation layer.6. Verify the results.

Steps to Model a Helper TableThis slide identifies the steps needed to model a helper table in an Oracle BI repository. Each step is presented in detail in the following slides.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 389: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 25

Copyright © 2008, Oracle. All rights reserved.

1. Create Helper Table

• Review requirements and identify where hierarchical relationships may present candidates for a helper table.

• Identify, build, and populate the required helper table.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 390: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 26

Copyright © 2008, Oracle. All rights reserved.

2. Build Physical Model

Import physical tables and create joins.

Return Fact

Position Dimension Position Helper Manager Alias

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 391: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 27

Copyright © 2008, Oracle. All rights reserved.

3. Build Logical Model

Use known techniques to build the logical model.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 392: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 28

Copyright © 2008, Oracle. All rights reserved.

4. Map Logical Table Source

Add a W_POSITION_D (Manager) logical table source to the Position dimension and map to the W_POSITION_H table.

4. Map Logical Table SourceTo avoid snowflaking in the logical layer, add a W_POSITION_D (Manager) logical table source to the Position dimension and map to the W_POSITION_H table.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 393: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 29

Copyright © 2008, Oracle. All rights reserved.

5. Build the Presentation Layer

Use known techniques to build Presentation layer objects.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 394: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 30

Copyright © 2008, Oracle. All rights reserved.

6. Verify the Results

• Query for product return data and verify that you get meaningful results at different levels of the hierarchy:

• Check log and verify that helper table is accessed:

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 395: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 31

Copyright © 2008, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to use bridge tables and helper tables to model many-to-many relationships in an Oracle BI repository.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 396: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 32

Copyright © 2008, Oracle. All rights reserved.

Practice 13-1 Overview: Modeling a Bridge Table

In this practice, you model a bridge table to resolve a many-to-many relationship between a fact table and a dimension table.

Practice 13-1 Overview: Modeling a Bridge TableAn ABC sales representative may participate in many deals that pay commission. Additionally, each deal may include many sales representatives so that each sales representative receives a percentage of the commission. You need to model this many-to-many relationship in the repository. There is a D1_COMMISSION fact table with commissions paid per invoice. D1_COMMISION_BRIDGE is the bridge table used to create a many-to-many relationship between the D1_COMMISSION fact table and the D1_SALESREP dimension table. D1_COMMISION_BRIDGE includes a weight factor to calculate the weighted distribution of commissions among sales teams. You import the tables and then model them in the repository.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 397: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 13 - 33

Copyright © 2008, Oracle. All rights reserved.

Practice 13-2 Overview: Modeling a Helper Table

In this practice, you use a helper table to model position hierarchy data to enable users to query for product return data and get meaningful results at different levels of the hierarchy.

Practice 13-2 Overview: Modeling a Helper TableRequirements have been gathered indicating that sales deals are executed and owned at different levels within the organization. Management would like to know which managers are responsible for what sales and product returns per their sales representatives’ efforts. The data warehouse team has created a helper table to support the requirement, and you model this table in the Oracle BI repository.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 398: Student Guide OBIEE 1

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 399: Student Guide OBIEE 1

Copyright © 2008, Oracle. All rights reserved.

Localizing Oracle BI Metadata

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 400: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 2

Copyright © 2008, Oracle. All rights reserved.

Objective

After completing this lesson, you should be able to configure Oracle Business Intelligence metadata to support multilingual environments.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 401: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 3

Copyright © 2008, Oracle. All rights reserved.

Business Challenges and Solution

Challenges: • Companies require multilingual support for global

deployments of Oracle Business Intelligence.• End users need to make decisions based on applications

and data presented in their own language.Solution: • Add multilingual support to Oracle BI.

Business Challenges and SolutionCompanies often require multilingual support for their deployment of Oracle BI. At the minimum, end users need to be able to view applications and data in their own language. Oracle BI provides the ability to localize both data and repository metadata.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 402: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 4

Copyright © 2008, Oracle. All rights reserved.

Oracle BI Multilingual Support

Requires three types of configurations:• Repository metadata, such as presentation folders

• Database data, such as product names

• Report and dashboard metadata, such as chart labels

Focus of this lesson

Focus of next lesson

Covered in a separate course

Oracle BI Multilingual SupportMultilingual support requires three types of configurations. The focus of this lesson is the localization of Oracle BI repository metadata. The focus of the next lesson “Localizing Oracle BI Data” is the localization of Oracle BI data. The localization of reports and dashboards is covered in the course titled Oracle BI Presentation Services 10g: Create Reports/Dashboards.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 403: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 5

Copyright © 2008, Oracle. All rights reserved.

Configuring Oracle BI Metadata

Involves configuring names and descriptions of repository metadata:• Uses a translation table to store language-specific names

and descriptions for metadata• Uses initialization blocks and variables to select the

preferred language of the user and the corresponding names and descriptions

Configuring Oracle BI MetadataConfiguring Oracle BI repository metadata requires the use of a translation table to store language-specific names and descriptions, as well as initialization blocks and variables. Initialization blocks and variables are used in conjunction with the translation table to select the preferred language of the user to display the correct metadata names and descriptions.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 404: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 6

Copyright © 2008, Oracle. All rights reserved.

WEBLANGUAGE Session Variable

Is populated with two-letter lowercase language code when user selects language during log in• Example: “en” for English

User selects language during login, which populates the WEBLANGUAGE

session variable.

WEBLANGUAGE Session Variable The WEBLANGUAGE session variable is populated with a two-letter lowercase language code when a user selects a language during log in. This variable is not populated until user logs in, so there is no way to test it from within the Oracle BI Administration Tool.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 405: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 7

Copyright © 2008, Oracle. All rights reserved.

LOCALE Session Variable

• Specifies how data is returned from the server• Localizes message strings, such as names of days and

months

Default LOCALE is specified in the NQSConfig.ini file.

LOCALE Session VariableThe LOCALE session variable specifies how data is returned from the Oracle BI Server. It localizes message strings, such as the names of days and months. The default LOCALE is specified in the General section of the NQSConfig.ini file.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 406: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 8

Copyright © 2008, Oracle. All rights reserved.

Changing Localization Preferences

Users can change WEBLANGUAGE and LOCALE preferences on the My Account page.

LOCALE variable

WEBLANGUAGE variable

Changing Localization PreferencesUsers can easily change their localization preferences by selecting Settings > My Account in the Oracle BI user interface.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 407: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 9

Copyright © 2008, Oracle. All rights reserved.

ABC Example

Localize metadata to the French language.

Localized Presentation layer

ABC ExampleIn the example for this lesson, you localize Oracle BI repository metadata to the French language.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 408: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 10

Copyright © 2008, Oracle. All rights reserved.

Steps to Localize Metadata

1. Externalize metadata objects.2. Run the Externalize Strings utility.3. Create a translation table.4. Import the translation table.5. Create an initialization block.6. Modify My Account preferences.7. Verify the translations.

Steps to Localize MetadataThis slide identifies the steps to localize Oracle BI repository metadata. Each step is presented in detail in the slides that follow.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 409: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 11

Copyright © 2008, Oracle. All rights reserved.

1. Externalize Metadata Objects

To set display variables, select Externalize Display Names or Externalize Descriptions for each presentation catalog or table that requires translation.

Name display variable

Description display variable

1. Externalize Metadata ObjectsTo set display variables, right-click a presentation catalog or presentation table. Select Externalize Display Names and Externalize Descriptions. The column display name and description values change to variables, which are populated by an initialization block.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 410: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 12

Copyright © 2008, Oracle. All rights reserved.

2. Run the Externalize Strings Utility

• Exports the names of the Presentation layer objects to a file in comma-separated value, tab-delimited, or XML format

• Externalizes the Presentation layer strings to enable set up of local language translations for them

Display variablePresentation layer object Presentation layer object string

2. Run the Externalize Strings UtilityAfter you select Externalize Display Names and Externalize Descriptions, you can run the Externalize Strings utility. The Externalize Strings utility is primarily for use by translators to translate Presentation layer catalogs, tables, columns, and their descriptions into other languages. You can save these text strings to a comma-separated, tab-delimited, or XML external file with ANSI, Unicode, and UTF-8 coding options. The screenshot shows a comma-separated file with the name of the Presentation layer object, the display variable (see previous slide), and the Presentation layer object string.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 411: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 13

Copyright © 2008, Oracle. All rights reserved.

3. Create a Translation Table

• Use file generated by the Externalize Strings utility to build translation table with translated text:

– Add row for each language and display variable.• Translation table must contain three required columns:

– LANG_ID identifies the language.– MSG_NUM identifies the display variable to be translated.– MSG_TEXT contains the translated text.

Add row for each language and display variable.

3. Create a Translation Table After you have run the Externalize Strings utility to generate a file, you create a translation table by modifying the file to include language translations. You must add a row for each language and display variable. For example, if there are 70 display variables and two languages, 140 rows are required. In this example, there is one English row and one French row for each display variable. If there were three languages, 210 rows would be required, and so on.The translation table has three required columns:

• LANG_ID identifies the language. It is typically a two-letter, lowercase code. In this example “fr” is used to indicate a French translation.

• MSG_NUM identifies the display variable to translate. One MSG_NUM row is required for each presentation catalog name, presentation catalog description, table name, table description, column name, and column description. The syntax is CX_[LABEL NAME], where ‘X’ is ‘N’ for name or ‘D’ for description. In the example in the slide, CN_SupplierSales is the display variable for the SupplierSales presentation catalog name and CD_SupplierSales is the display variable for the SupplierSales presentation catalog description.

• MSG_TXT contains the translated text.In the example in the slide, there is one additional, nonrequired column, METADATA_OBJECT, which is used to help identify each object.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 412: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 14

Copyright © 2008, Oracle. All rights reserved.

4. Import the Translation Table

Import the translation table to the Physical layer to give Oracle BI Server access to the translation information.

Import populated translation table to the Physical layer.

4. Import the Translation TableUse known techniques to import the translation table to the Physical layer of the repository. This is an optional step.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 413: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 15

Copyright © 2008, Oracle. All rights reserved.

5. Create an Initialization Block

Create a row-wise initialization block that populates session variables with values from the translation table based on the value of WEBLANGUAGE.

Populates the MSG_NUM and MSG_TEXT session variables based on the WEBLANGUAGE

session variable

Row-wise initialization

5. Create an Initialization BlockCreate a row-wise initialization block that populates session variables with values from the translation table based on the value of WEBLANGUAGE. The row-wise initialization option allows you to create session variables dynamically and set their values when a session begins. The names and values of the session variables reside in an external database that you access through a connection pool. The variables receive their values from the initialization string that you enter in the Session Variable Initialization Block Data Source dialog box. In this example, the initialization block populates the MSG_NUM and MSG_TEXT session variables using data from the TRANSLATIONS table.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 414: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 16

Copyright © 2008, Oracle. All rights reserved.

6. Modify My Account Preferences

Set locale or language on the My Account page.

Setting a locale automatically selects the native language

for that locale.

6. Modify My Account PreferencesTo verify results, change the localization preferences on the My Account page.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 415: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 17

Copyright © 2008, Oracle. All rights reserved.

7. Verify the Translations

• Verify that objects are translated as expected.

• Check NQQuery.log and verify that the initialization block issued a SQL query.

Metadata objects translated

7. Verify the TranslationsOpen Oracle BI Answers and verify that the metadata is translated as expected. Check the NQQuery.log file to verify that the initialization block executed the expected query.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 416: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 18

Copyright © 2008, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to configure Oracle BI metadata to support multilingual environments.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 417: Student Guide OBIEE 1

Oracle BI Suite EE 10g R3: Build Repositories 14 - 19

Copyright © 2008, Oracle. All rights reserved.

Practice 14-1 Overview: Localizing Repository Metadata

In the practice, you localize Oracle BI repository metadata.

Practice 14-1 Overview: Localizing Repository MetadataThe Externalize Stings repository utility has been run to export the Presentation layer object strings to a table in comma-separated format. The table has been updated to include translated strings. You import the table, create an initialization block to populate translation session variables, modify My Account localization preferences, and verify the results in Answers and NQQuery.log.

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y

Page 418: Student Guide OBIEE 1

Ora

cle

Inte

rnal

& O

racl

e A

cade

my

Use

Onl

y