obiee10g metadata modeling basics
TRANSCRIPT
-
OBIEE10g
OBIEE10g Metadata Modeling
Basics Training
Michal Zima Killorglin, 8.10.2013
-
OBIEE10g Metadata Modeling Basics 2
Get Introduced (trainer, participants) Training :
Audience Prerequisites Objectives Agenda
Training Introduction/Logistic
Lesson Agenda
-
OBIEE10g Metadata Modeling Basics 3
Trainer introduction : Over 10 years of experience with DWH/BI Oracle technologies and building solution using those technologies 6 years of experience with OBIEE (past Siebel Analytics) technology
Worked for global companies (Siebel, Oracle) in consulting practice
A few words about you (participants) : Name Role Prior experience with BI (particularly OBIEE) and DWH
Training Introduction/Logistic
Trainer, participants introduction
-
OBIEE10g Metadata Modeling Basics 4
Training is aimed mainly to: Business Intelligence developers DWH/Data designers BI Architects Business analysts
Training Introduction/Logistic
Training Audience
-
OBIEE10g Metadata Modeling Basics 5
Desirable experience/knowledge for participants: Some BI/DWH experience Knowledge of Data modeling principles, ideally Kimball Dimensional Modeling Knowledge (at least basic) of SQL language
Training Introduction/Logistic
Training Prerequisites
-
OBIEE10g Metadata Modeling Basics 6
Gain basic knowledge of OBIEE10g architecture and its components Gain knowledge of metadata structure (layers) Gain basic knowledge of BI Administration Tool (client sw, used for designing metadata) Learn basic administration routines and best practices Gain (using practical labs) essential basic knowledge for being able to independently build OBIEE10g on top of relational data sources
Training Introduction/Logistic
Training Objectives
-
OBIEE10g Metadata Modeling Basics 7
Day 1: Training Introduction/Logistic OBIEE10g architecture/Repository Introduction Physical Layer of a Repository Business Model and Mapping Layer of a Repository Presentation Layer of a Repository
Day 2: Testing and Validating a Repository Adding Multiple Logical Table Sources Adding Calculations to a Fact Creating Dimension Hierarchies and Level-Based Measures
Training Introduction/Logistic
Training Agenda
-
OBIEE10g Metadata Modeling Basics 8
Day 3: Using Aggregates Using Repository Variables Modeling Time Series Data Security Basics
Training Introduction/Logistic
Training Agenda
-
OBIEE10g Metadata Modeling Basics 9
Become familiar with OBIEE10g architecture and its components Become familiar with 3 layers of OBIEE10g repository (metadata) Learn about BI Administration Tool
OBIEE10g architecture / Repository Introduction
Lesson Objectives
-
OBIEE10g Metadata Modeling Basics 10
OBIEE10g architecture / Repository Introduction
OBIEE10g architecture
Ad-hoc Analysis
Proactive Detection and Alerts
MS Office Plug-in
Reporting & Publishing
Interactive Dashboards
Disconnected Analytics
Oracle
BI Server Multidimensional Calculation and Integration Engine
Intelligent Caching Services
Enterprise Business Model and Abstraction Layer
Web Services
OLTP & ODS Systems
Data Warehouse Data Mart
SAP, Oracle PeopleSoft, Siebel, Custom Apps
Files Excel XML
Business Process
Physical Layer
Oracle BI Server
Oracle BI server generates one or more Physical SQL queries
-
OBIEE10g Metadata Modeling Basics 11
Main OBIEE10g architecture components: Clients BI Presentation Services BI Server Data sources
OBIEE10g architecture / Repository Introduction
OBIEE10g architecture
-
OBIEE10g Metadata Modeling Basics 12
Provide access to BI content (requests, dashboards) within OBIEE10g UI: Answers tool for creation/modification/view of requests (synonym for a
Interactive Dashboards for displaying Answers requests along with other content on dashboard pages (also allowing interactivity for exposed requests
OBIEE10g architecture / Repository Introduction
Clients
-
OBIEE10g Metadata Modeling Basics 13
Takes care of rendering OBIEE10g web based UI : Answers Interactive Dashboards Delivers Administration
dashboards..) Presentation Catalog Gets the data from Oracle BI server and provides it to the clients
OBIEE10g architecture / Repository Introduction
BI Presentation Services
-
OBIEE10g Metadata Modeling Basics 14
Uses metadata (repository) during data processing Communicates with underlying data sources For relational data sources it generates dynamic SQL select statement to get the data
connect to data sources It provides results of the queries (eventually enriched by its own calculations) to
Acts as a virtual data source to its surroundings (accessible via ODBC interface)
OBIEE10g architecture / Repository Introduction
BI Server
-
OBIEE10g Metadata Modeling Basics 15
Contains metadata used by BI Server It has physically the form of binary file with RPD extension
semantic model (business model) Repository is created/modified by client tool BI Administration Tool (available on Windows platform only)
OBIEE10g architecture / Repository Introduction
BI repository (metadata)
-
OBIEE10g Metadata Modeling Basics 16
Contains data/information relevant to business users for analysis/reporting BI Server is getting data from the data sources BI Server can work with different data sources:
Relational databases (RDBMS) most common OLAP data sources (Essbase, MSAS, SAP BW..) XML files Excels (on Windows platform only, mainly for demonstration purposes)
be able to generate most effective SQL statements
of suitable form Kimball dimensional model)
OBIEE10g architecture / Repository Introduction
Data sources
-
OBIEE10g Metadata Modeling Basics 17
1 - User submits a request (report) 2 - BI Presentation Services asks for a data (in form of logical SQL) to BI Server 3 - BI Server uses a metadata (repository) to address correct data source and generates optimized SQL to get the data 4 - BI Server receives the data from the data sources and perform any post-processing if needed (internal calculation, internal joins of data sets....) 5 - BI Server passes the data to Presentation Services (result of logical SQL send to BI Server) 6 - BI Presentation Services formats the data and sends it to the client (Answers, Dashboards)
OBIEE10g architecture / Repository Introduction
Request Execution Data Flow
-
OBIEE10g Metadata Modeling Basics 18
Tool for building BI Server metadata divided into 3 layers: Physical Business Model and Mapping (BMM) Presentation
OBIEE10g architecture / Repository Introduction
BI Administration Tool
-
OBIEE10g Metadata Modeling Basics 19
OBIEE10g architecture / Repository Introduction
Metadata Layers
Presentation Layer
Physical Layer
Semantic Object Layer
Simplified view Logical SQL interface
Dimensions Hierarchies Measures Calculations Aggregation Rules Time Series
Map Physical Data Connections Schema
-
OBIEE10g Metadata Modeling Basics 20
OBIEE10g architecture / Repository Introduction
Physical Layer
Physical Layer
Multiple sources Optimized SQL generation Regardless of Schema Function ship to appropriate data sources/Compensation
DB2
Supply
Chain
DM
Teradata
OLAP
Oracle
ERP.
XML Data
Source
SQL Server
Acxiom
Siebel
Operational
-
OBIEE10g Metadata Modeling Basics 21
Contains objects representing physical data sources used for reporting/analysis by BI Server Can multiple (even disparate) data sources First layer built in the repository
OBIEE10g architecture / Repository Introduction
Physical Layer
-
OBIEE10g Metadata Modeling Basics 22
OBIEE10g architecture / Repository Introduction
Physical Layer Objects
Data Source Connection Pool
Aliases with specific prefixes
Actual tables
Schema folder
Extra aliases to prevent circular joins
Extra aliases for
reporting
Canonical time dimension
-
OBIEE10g Metadata Modeling Basics 23
OBIEE10g architecture / Repository Introduction
Business Model and Mapping Layer
Business Model Layer
Physical complexity converted to logical subject areas Drill-Paths Complex/Derived Measures (Level-based, time series, dimension-specific, nested) Aggregate/Fragment Aware
-
OBIEE10g Metadata Modeling Basics 24
OBIEE10g architecture / Repository Introduction
Business Model and Mapping Layer transformation into dimension model
XML
CSV
ODBC
OLTP
OLAP
Dimensions
Facts
-
OBIEE10g Metadata Modeling Basics 25
(semantic layer) understandable by end/business users is performed It has a form of logical star schemas according to dimensional modeling methodology (R. Kimball)
OBIEE10g architecture / Repository Introduction
Business Model and Mapping Layer
-
OBIEE10g Metadata Modeling Basics 26
OBIEE10g architecture / Repository Introduction
Business Model and Mapping Layer Objects
Dimensions (Hierarchies)
Dimension Logical Tables
Fact Logical Tables
Logical Table Sources
Logical Columns
Business Model
Measures (Fact Logical Columns )
-
OBIEE10g Metadata Modeling Basics 27
OBIEE10g architecture / Repository Introduction
Business Model Mappings
BMM layer objects map to data objects in the Physical layer Mappings is usually 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
-
OBIEE10g Metadata Modeling Basics 28
OBIEE10g architecture / Repository Introduction
Presentation Layer
Presentation Layer Role-based, in context, personalized presentation Oracle Answers
-
OBIEE10g Metadata Modeling Basics 29
Only metadata layer directly exposed to end users Contains objects, providing view to a business model for end users Exposes just objects, relevant to users (simplification)
OBIEE10g architecture / Repository Introduction
Presentation Layer
-
OBIEE10g Metadata Modeling Basics 30
OBIEE10g architecture / Repository Introduction
Presentation Layer Objects Presentation Catalog
Presentation Folder
Presentation Column
Subject Area
Folder
Column
-
OBIEE10g Metadata Modeling Basics 31
OBIEE10g architecture / Repository Introduction
Presentation Layer Mappings
Presentation layer objects map to objects in BMM layer Subject area/Presentation Catalog maps to Business Model Presentation Folder may map to logical table Presentation Column maps (strict mapping) to logical column
-
OBIEE10g Metadata Modeling Basics 32
OBIEE10g architecture / Repository Introduction
Repository Directory
\OracleBI\server\Repository
-
OBIEE10g Metadata Modeling Basics 33
OBIEE10g architecture / Repository Introduction
Repository Modes
Repository files can be opened for editing in offline or online mode Offline Mode:
Repository file (RPD) is open from file system Online Mode:
Connection is made (via ODBC driver) to live BI Server We are working against repository 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
-
OBIEE10g Metadata Modeling Basics 34
OBIEE10g architecture / Repository Introduction
NQSConfig.ini configuration file
One entry in configuration file NQSConfig.INI (\OracleBI\server\Config) instructs BI server, which RPD file to use for its operation
-
OBIEE10g Metadata Modeling Basics 35
OBIEE10g architecture / Repository Introduction
Summary
In this lesson, we have learned about : Key components of OBIEE10g architecture Three layers of BI Server repository and their relations BI Administration Tool and its purpose
-
OBIEE10g Metadata Modeling Basics 36
OBIEE10g architecture / Repository Introduction
Labs - Overview
This lesson is accompanied with following labs: Exploring BI Server repository
-
OBIEE10g Metadata Modeling Basics 37
Learn about the objects in Repository Physical layer Create Repository Physical layer
Physical Layer of a Repository
Lesson Objectives
-
OBIEE10g Metadata Modeling Basics 38
Physical Layer of a Repository
Contains objects representing physical data sources used for reporting/analysis by BI Server Can multiple (even disparate) data sources First layer built in the repository
Physical Layer
-
OBIEE10g Metadata Modeling Basics 39
Physical Layer of a Repository
Physical Layer Objects
Database object
Connection Pool
Aliases with specific prefixes
Actual tables
Schema folder
Extra aliases to prevent circular joins
Extra aliases for
reporting
Canonical time dimension
-
OBIEE10g Metadata Modeling Basics 40
Physical Layer of a Repository
Represents the highest-level object in Physical layer Specifies data source, which is used by BI Server for querying (database type, etc...)
Database Object
Database object
-
OBIEE10g Metadata Modeling Basics 41
Physical Layer of a Repository
Name DB instance name) Database type of the data source (influences queries generated by BI server) :
Relational Multidimensional File based (XML)
Database Object General tab
-
OBIEE10g Metadata Modeling Basics 42
Physical Layer of a Repository
You can set the SQL features, BI Server can leverage when querying this data source OBIEE has "knowledge base" for default features for registered data source types (like Oracle Db) Be careful when overwriting the default values (can considerably influence generated SQL statements) You can "Ask DBMS" for setting DB features while working in online mode
Database Object Features tab
-
OBIEE10g Metadata Modeling Basics 43
Physical Layer of a Repository
Connection Pool Defines connection of BI Server to a data source Could be either generic ODBC or native connectivity (Oracle Db) Uses principle of "connection pooling" - multiple users share pool of connection to a data source Connection
Pool Name
Connectivity Type (Native/ODBC)
Max no of connections
For querying Db objects in different owner schemas
Data source name (ODBC name or connect descriptor)
Shared logon username/password
Connection Pooling Enabled
-
OBIEE10g Metadata Modeling Basics 44
Physical Layer of a Repository
Physical Schema Optional object Container object for definitions of tables, columns For Oracle Db it represents Db schema, owning imported database objects definitions (tables, views) its name is used in generated SQL - .
Physical Schema
-
OBIEE10g Metadata Modeling Basics 45
Physical Layer of a Repository
Physical Table Corresponds to a table (or view) in a physical data source Most typically the definition is imported from a database or other data source (although can be created manually as well) Provides metadata needed for BI Server to access the tables/views with SQL queries
Physical Table
-
OBIEE10g Metadata Modeling Basics 46
Physical Layer of a Repository
Physical Table Properties Table Type:
Physical Table (most common) Stored Proc (never used from my experience)
source) - functionality
Name
Table Type
Dynamic Name (using variables)
Caching Properties
-
OBIEE10g Metadata Modeling Basics 47
Physical Layer of a Repository
Alias Represents "pointer" to physical table definition (created by right-clicking on physical table definition) Used mainly to avoid circular join definition in physical layer (for example role playing dimensions in Kimball methodology) Alias structure (columns) is "read-only", always reflects structure of original table definition Appears with different icon in physical layer
Alias Name
Source Table
-
OBIEE10g Metadata Modeling Basics 48
Physical Layer of a Repository
Physical Column Object that corresponds to a column in a physical database Child object of physical table It has data type (internal BI Server, corresponding to Db data types) and nullable property
Columns
-
OBIEE10g Metadata Modeling Basics 49
Physical Layer of a Repository
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 Column
Foreign Keys within table definition
-
OBIEE10g Metadata Modeling Basics 50
Physical Layer of a Repository
Joins Represent primaryforeign key relationships between tables in the Physical layer Usually defined in Physical diagram Join Properties define:
Tables joined Cardinality Join Expression
Join Properties
Physical Diagram
-
OBIEE10g Metadata Modeling Basics 51
Physical Layer of a Repository
Labs Scenario
in a schema SH containing data about : Sales figures (amount, quantity) by day, product, promotions, channels and customers Unit price and costs by day , product, promotions, channels
-
OBIEE10g Metadata Modeling Basics 52
Physical Layer of a Repository
Physical Layer Implementation Steps
1. Import the physical schema from data source 2. Select tables (and columns) to be imported 3. Import keys and joins (optional) 4. Check the import 5. Edit connection pool properties 6. Define physical keys and joins
-
OBIEE10g Metadata Modeling Basics 53
Physical Layer of a Repository
Import the physical schema
Using BI Administration Tool menu File -> Import -
Connect descriptor from tnsnames.ora
Connection Type (OCI for Oracle Db)
Credentials for connection to Db
-
OBIEE10g Metadata Modeling Basics 54
Physical Layer of a Repository
Select tables (and columns) to be imported
In import wizard (next step) select tables/columns needed for building physical model in physical layer (you can add tables later on)
Filtering tables for import
Tables selected for import
Objects for import
-
OBIEE10g Metadata Modeling Basics 55
Physical Layer of a Repository
Import keys and joins
You can import keys, foreign keys and corresponding joins, if they are defined in a data source This selection is optional, you can define keys, joins "manually" later on (to have better control over the build physical data model)
-
OBIEE10g Metadata Modeling Basics 56
Physical Layer of a Repository
Check the import
Check, whether correct schema, tables, columns, and keys has been imported You can use View Data option to check the connection to data source
-
OBIEE10g Metadata Modeling Basics 57
Physical Layer of a Repository
Edit connection pool properties
After import (or during import when importing for the first time), you check or modify the connection pool properties using the Connection Pool properties dialog box Connection
Pool Name
Connectivity Type (Native/ODBC)
Max no of connections
For querying Db objects in different owner schemas
Data source name (ODBC name or connect descriptor)
Shared logon username/password
Connection Pooling Enabled
-
OBIEE10g Metadata Modeling Basics 58
Physical Layer of a Repository
Define physical keys and joins
In case keys and joins has not been imported automatically (either intentionally or they do not exists in Db) from data source (Db), you can define them in Admin Tool:
Define keys (and also joins) using the Physical Table properties dialog box Define joins and keys using the Physical Diagram
-
OBIEE10g Metadata Modeling Basics 59
Physical Layer of a Repository
Defining Keys Using the Table Properties
Key Name
Select columns, constituting a key
-
OBIEE10g Metadata Modeling Basics 60
Physical Layer of a Repository
Using the Physical Diagram
Physical Diagram can be open by selecting tables in physical layer and then Right- Or use
-
OBIEE10g Metadata Modeling Basics 61
Physical Layer of a Repository
Physical Diagram Foreign Key
in a toolbar
Drag from table with cardinality 1 and drop to table with cardinality N Define join property (name, join expression) in Physical Foreign Key dialog window
FK Name
Join Expression
-
OBIEE10g Metadata Modeling Basics 62
Physical Layer of a Repository
Summary
In this lesson, we have learned : About objects constituting Physical layer of a repository How to create Physical layer of a repository
-
OBIEE10g Metadata Modeling Basics 63
Physical Layer of a Repository
Labs - Overview
This lesson is accompanied with following labs: Become BI solution (metadata) Create empty repository and import tables Define keys and joins
-
OBIEE10g Metadata Modeling Basics 64
Learn about the objects in Repository Business Model and Mapping (BMM) layer Create a business model Create measures in a business model
Business Model and Mapping
Layer of a Repository
Lesson Objectives
-
OBIEE10g Metadata Modeling Basics 65
(semantic layer) understandable by end/business users is performed It has a form of logical star schemas according to dimensional modeling methodology (R. Kimball) Measures and (Dimensional) attributes are clearly defined in this layer
Business Model and Mapping
Layer of a Repository
Business Model and Mapping (BMM) Layer
-
OBIEE10g Metadata Modeling Basics 66
Business Model and Mapping
Layer of a Repository
Business Model and Mapping Layer Objects
Dimensions (Hierarchies)
Dimension Logical Tables
Fact Logical Tables
Logical Table Sources
Logical Columns
Business Model
Measures (Fact Logical Columns )
-
OBIEE10g Metadata Modeling Basics 67
Business Model and Mapping
Layer of a Repository
Business Model Mappings
BMM layer objects map to data objects in the Physical layer Mappings is usually 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
Mapping of logical columns can also include transformations/formulas
-
OBIEE10g Metadata Modeling Basics 68
Business Model and Mapping
Layer of a Repository
BMM Layer Objects
Business model Logical tables (logical dimensions/logical facts) Logical table sources Logical columns Measures (Special form of logical column) Logical primary keys Logical joins
-
OBIEE10g Metadata Modeling Basics 69
Business Model and Mapping
Layer of a Repository
Business model
Is the top-level object in the BMM layer Contains the business model definitions (logical star schemas) and the mappings from logical to physical tables Business Model uses terminology familiar to business users (not "cryptic" physical object names)
Business Model
Business Terms
-
OBIEE10g Metadata Modeling Basics 70
Business Model and Mapping
Layer of a Repository
Logical Table
Logical Table contains logical columns that can be mapped to one or more physical columns from the physical layer Represents logical fact or logical dimension Can be created:
Automatically by dragging tables from Physical layer Manually by right-clicking business model and selecting New Object > Logical Table
-
OBIEE10g Metadata Modeling Basics 71
Business Model and Mapping
Layer of a Repository
Logical Table Source (LTS)
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
-
OBIEE10g Metadata Modeling Basics 72
Business Model and Mapping
Layer of a Repository
Logical Table Source - Column Mappings
Within Logical Table Source (LTS), you define mapping between logical columns of logical table and physical columns from tables, constituting LTS Column Mapping tab within LTS dialog box is intended for building, viewing or modifying logical to physical column mappings
-
OBIEE10g Metadata Modeling Basics 73
Business Model and Mapping
Layer of a Repository
Logical Column
Represent the business element (attribute, measure) of the data Can map to many columns in the Physical layer Can be defined by referring other logical columns in formula (calculation) 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 (and then defining mapping to physical column within LTS)
-
OBIEE10g Metadata Modeling Basics 74
Business Model and Mapping
Layer of a Repository
Logical Table Primary Key
Define unique identifiers (logical columns) for logical tables (but from business point of view, not for example " generated DWH keys) Define the lowest level of detail of a logical table Logical Keys are only required for logical dimension tables (for repository to be valid), not for logical fact tables
-
OBIEE10g Metadata Modeling Basics 75
Business Model and Mapping
Layer of a Repository
Logical Join
Defines the cardinality relationship between logical tables (derives the logical table role in model - dimension or fact) Is 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 There is no "join expression" defined as part of logical join definition (as opposed to join definition on physical layer - FK)
-
OBIEE10g Metadata Modeling Basics 76
Business Model and Mapping
Layer of a Repository
Logical Join
-
OBIEE10g Metadata Modeling Basics 77
Business Model and Mapping
Layer of a Repository
Measure
Represents calculations with measurable quantity Special form of logical columns placed in logical fact tables Have aggregation rule defined in metadata
-
OBIEE10g Metadata Modeling Basics 78
Business Model and Mapping
Layer of a Repository
Scenario
Logical dimensions:
Time (Periods) Products Customers Channels Promotions
Logical Facts : SALES - main fact table containing total sales measures (amount, quantity) by day, product, promotions, channels and customers COSTS - "supporting" fact table with unit price and unit cost measures by day, product, promotions, channels
-
OBIEE10g Metadata Modeling Basics 79
Business Model and Mapping
Layer of a Repository
Scenario
-
OBIEE10g Metadata Modeling Basics 80
Business Model and Mapping
Layer of a Repository
BMM Layer Implementation Steps
1. Create business model 2. Create logical tables and columns 3. Define logical joins 4. Modify logical tables and columns 5. Define measures in logical fact tables
-
OBIEE10g Metadata Modeling Basics 81
Business Model and Mapping
Layer of a Repository
1. Create business model
Right-click in the BMM layer and select New Business Model (more control over the process) Or Dragging selected physical tables into BMM layer
-
OBIEE10g Metadata Modeling Basics 82
Business Model and Mapping
Layer of a Repository
2. Create logical tables and columns
Drag physical table objects from the Physical layer into BM definition fast, but less control over the process (creates automatically also logical columns for all physical columns) Or right-click BM object and select New Object > Logical Table (logical columns needs to be defined afterwards)
-
OBIEE10g Metadata Modeling Basics 83
Business Model and Mapping
Layer of a Repository
3. Define logical joins
Similar to definition of foreign key joins in physical layer Business Model Diagram used for it and complex join used instead of foering key join (with no join expression defined, just cardinality)
-
OBIEE10g Metadata Modeling Basics 84
Business Model and Mapping
Layer of a Repository
4. Modify logical tables and columns
Rename tables and columns Reorder columns Add or delete tables and columns Add, delete and modify logical table sources (LTS) Cut, copy and paste objects (but with
-
OBIEE10g Metadata Modeling Basics 85
Business Model and Mapping
Layer of a Repository
5. Define measures in logical fact tables
Special form of logical columns placed in logical fact tables (with aggregation rule) Right-click the logical column (numeric) in logical fact table and select Properties > Aggregation
-
OBIEE10g Metadata Modeling Basics 86
Business Model and Mapping
Layer of a Repository
Recommended practice
Use only complex joins in BMM layer !!!!!!! Rename logical columns to have meaningful names by end user community (business dictionary) Use (if possible) short enough names (due to the space in requests) Use unique names for logical columns to avoid ambiguity
-
OBIEE10g Metadata Modeling Basics 87
Business Model and Mapping
Layer of a Repository
Summary
In this lesson, we have learned : About objects constituting BMM layer of a repository How to create BM layer of a repository (including simple measures)
-
OBIEE10g Metadata Modeling Basics 88
Business Model and Mapping
Layer of a Repository
Labs - Overview
This lesson is accompanied with following labs: Creating Business Model Creating Simple Measures
-
OBIEE10g Metadata Modeling Basics 89
Learn about the objects of Presentation layer of a repository Modify the properties of Presentation layer objects Create Presentation layer
Presentation Layer of a
Repository
Lesson Objectives
-
OBIEE10g Metadata Modeling Basics 90
Only metadata layer directly exposed to end users Contains objects, providing view to a business model for end users Exposes just objects, relevant to users (simplification)
Presentation Layer of a
Repository
Presentation Layer
-
OBIEE10g Metadata Modeling Basics 91
Organize and simplify business model for a set of users Single presentation catalog must be populated from a single business model (presentation catalog cannot "span" across business models) But multiple Presentation catalogs can reference the same business model (pretty common scenario)
Presentation Layer of a
Repository
Presentation Catalog
-
OBIEE10g Metadata Modeling Basics 92
Organize presentation columns into that make sense to the users May contain columns from one or more logical tables Can be modified independently of logical tables (no strict "mapping" between logical table and presentation table) Can be created:
Automatically by dragging logical tables from BMM layer Manually in the Presentation layer
Presentation Layer of a
Repository
Presentation Tables
-
OBIEE10g Metadata Modeling Basics 93
Define the columns used to build requests in the OBIEE user interface Map to logical columns in the BMM layer (strict 1:1 mapping) Usually derive their names from corresponding logical column name (best practice) Can be created:
Automatically by dragging logical tables or columns from BMM layer Manually in the Presentation layer
Presentation Layer of a
Repository
Presentation Columns
-
OBIEE10g Metadata Modeling Basics 94
Presentation Layer of a
Repository
Presentation Layer Mappings
Presentation layer objects map to objects in BMM layer Subject area/Presentation Catalog maps to Business Model Presentation Table may map to logical table Presentation Column maps (strict mapping) to logical column
-
OBIEE10g Metadata Modeling Basics 95
Presentation Layer of a
Repository
Defining User Interface in the Presentation Layer
Presentation layer objects define the content (Subject Areas), which end users see to query the data from the data sources
-
OBIEE10g Metadata Modeling Basics 96
Presentation Layer of a
Repository
Nested Presentation Folders/Tables
Give the appearance of nested folders in Answers tool In Description of presentation table put following characters ate the beginning : -> Place presentation table after the table in which you would like to nest it
-
OBIEE10g Metadata Modeling Basics 97
Presentation Layer of a
Repository
Presentation Layer Object Aliases
Keep track of any changes to Presentation layer objects Used in Answers when referencing renamed presentation layer object in Answer request Have additional overhead for BI Presentation Server Avoid renaming after BI outputs has been intensively created (rather perform replacing in Web Catalog)
-
OBIEE10g Metadata Modeling Basics 98
Presentation Layer of a
Repository
Scenario
data
-
OBIEE10g Metadata Modeling Basics 99
Presentation Layer of a
Repository
Presentation Layer Implementation Steps
1. Create new presentation catalog 2. Rename tables 3. Reorder tables 4. Delete columns 5. Rename columns 6. Reorder columns
-
OBIEE10g Metadata Modeling Basics 100
Presentation Layer of a
Repository
1. Create a New Presentation Catalog
Drag SH business model from BMM layer to Presentation layer to automatically create Presentation layer objects (the simplest method)
-
OBIEE10g Metadata Modeling Basics 101
Presentation Layer of a
Repository
2. Rename tables
There are a few methods for renaming tables in 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
-
OBIEE10g Metadata Modeling Basics 102
Presentation Layer of a
Repository
3. Reorder tables
For reordering of presentation tables in Presentation Catalog, open the Presentation Catalog properties and use the Up and Down buttons or drag/drop
-
OBIEE10g Metadata Modeling Basics 103
Presentation Layer of a
Repository
4. Delete columns
Delete unnecessary columns to simplify the content and make it more understandable to users (don't overcomplicate structure of Presentation Catalog for end users)
-
OBIEE10g Metadata Modeling Basics 104
Presentation Layer of a
Repository
5. Rename columns
Presentation columns use the logical column name by default - this is the recommended approach to "inherit" logical column names in presentation layer to have consistent naming of a single logical column across different Presentation Catalog If there is a special need for renaming presentation column, use General tab in the column properties dialog box to deselect the Use Logical Column Name check box and enter custom name
-
OBIEE10g Metadata Modeling Basics 105
Presentation Layer of a
Repository
6. Reorder columns
For reordering of presentation columns, open Presentation Table properties box and use the Up and Down buttons or drag/drop
-
OBIEE10g Metadata Modeling Basics 106
Presentation Layer of a
Repository
Consideration
Presentation catalogs can map to only one BM Multiple presentation catalogs can map to the same BM Presentation columns in single presentation table can come from multiple logical tables in BM Presentation columns are automatically renamed when corresponding logical column is renamed (with alias created for previous name) Presentation tables cannot have the same name as presentation catalogs Presentation objects can be modified or deleted without affecting corresponding logical objects Be careful with modification/restructuring of presentation objects in case BI "outputs" are already using them
-
OBIEE10g Metadata Modeling Basics 107
Presentation Layer of a
Repository
Recommendation/Best Practice
Use meaningful names
prevents it (also avoid spaces at the beginning/end) 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 (grouping in presentation tables) Eliminate unnecessary objects to reduce confusion (KISS principle) Use object description fields to convey information to users (displays as tooltip in Answers) Keep names short to save space on reports
-
OBIEE10g Metadata Modeling Basics 108
Presentation Layer of a
Repository
Summary
In this lesson, we have learned : About objects constituting Presentation layer of a repository How to crete Presentation layer of a repository How to modify the properties of Presentation layer objects
-
OBIEE10g Metadata Modeling Basics 109
Presentation Layer of a
Repository
Labs - Overview
This lesson is accompanied with following labs: Creating Presentation layer objects Modifying Presentation layer objects
-
OBIEE10g Metadata Modeling Basics 110
Learn about execution of steps for testing and validating a repository
Testing and Validating a
Repository
Lesson Objectives
-
OBIEE10g Metadata Modeling Basics 111
The following steps validate whether the repository is constructed correctly and whether it produces expected query results:
Checking repository for consistency Enabling logging Loading/Deploying a repository Checking a repository using BI Answers front end tool Inspecting the query log
Testing and Validating a
Repository
Validating a Repository
-
OBIEE10g Metadata Modeling Basics 112
Testing and Validating a
Repository
Scenario Validate and test SH business model before making it available for using by end users
-
OBIEE10g Metadata Modeling Basics 113
It is a feature of BI 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: logical fact table and logical dimension table. Both can map to the same physical table. There are no circular logical join relationships. At least one Presentation Catalog exists for business model.
Does not guarantee that the business model is constructed correctly
Testing and Validating a
Repository
Consistency Check
-
OBIEE10g Metadata Modeling Basics 114
Check consistency for the entire repository or for individual repository objects by using either of the following menus (you are also asked when saving RPD):
Testing and Validating a
Repository
Checking Consistency
File Menu Tools Menu BMM layer object right-click menu
-
OBIEE10g Metadata Modeling Basics 115
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 (disabled by default)
Testing and Validating a
Repository
Consistency Check Manager
-
OBIEE10g Metadata Modeling Basics 116
The Options tab in the Consistency Check Manager allows to enable or disable consistency messages
Testing and Validating a
Repository
Disabling/Enabling Consistency Check Messages
-
OBIEE10g Metadata Modeling Basics 117
BI Server provides a facility for logging query activity at the individual user level (driven by variable LOGLEVEL set for individual users) Logging is intended for quality assurance testing, debugging, and use by Oracle Support Query logging is normally disabled in production mode (turning logging on causes additional overhead on OBIEE server infrastructure - log file can extensively grow) Query log file is named NQQuery.log and is located in the \OracleBI\server\Log directory Various levels of query logging enables various degree of details logged
Testing and Validating a
Repository
Enabling Logging
-
OBIEE10g Metadata Modeling Basics 118
Use the Security Manager to enable logging level for individual users Or set LOGLEVEL session variable using Initialization Block (session variables are
Repository
Testing and Validating a
Repository
Setting a Logging Level
-
OBIEE10g Metadata Modeling Basics 119
There are 7 log levels (higher levels are intended just for communicating issues with Oracle support) Logging level 2 allows you to see the SQL generated (sufficient for testing/debugging)
Testing and Validating a
Repository
Logging Levels
-
OBIEE10g Metadata Modeling Basics 120
After you build a repository and it is consistent, you need to "point" BI Server to use this RPD - add/modify an entry in the NQSConfig.ini file
Testing and Validating a
Repository
Adding a Repository Entry to an Initialization File
-
OBIEE10g Metadata Modeling Basics 121
If the repository was edited in offline mode (recommended practice), start or restart BI Server process to load new/modified repository If the repository was edited in online mode (just for small changes, not recommended), check in changes and reload the server metadata in Answers
Testing and Validating a
Repository
Loading Repository
-
OBIEE10g Metadata Modeling Basics 122
Use Oracle BI Answers to validate Presentation layer by creating testing request (report) and displaying query results
Testing and Validating a
Repository
Validating by Using BI Answers
-
OBIEE10g Metadata Modeling Basics 123
Use the query log to check query results: Either directly looking at NQQuery.log file on the OBIEE server(located in \OracleBI\server\Log) Or by going into Manage Session in Administration page of OBIEE UI
Testing and Validating a
Repository
Inspecting the Query Log
-
OBIEE10g Metadata Modeling Basics 124
Testing and Validating a
Repository
Inspecting the Query Log
-
OBIEE10g Metadata Modeling Basics 125
Basic syntax for an Oracle BI SELECT statement : SELECT . list FROM WHERE GROUP BY ORDER BY . list (optional)
Example of logical SQL : SELECT Calendar."Calendar Year" , Products."Prod Category" , "Sales Facts"."Amount Sold" FROM SH WHERE Calendar."Calendar Year" = 2000 ORDER BY Calendar."Calendar Year" , Products."Prod Category"
Testing and Validating a
Repository
BI Server Logical SQL SELECT
-
OBIEE10g Metadata Modeling Basics 126
BI Server Logical SQL SELECT statements are different from standard SQL in the following ways: No join information is required (SQL is constructed against Presentation layer objects)
Join conditions are predefined in the repository Any join conditions supplied in a query are ignored
No aggregation functions are required (since measures have their aggregation rule defined in repository and thus performed for them automatically), although aggregation function can be defined in logical SQL No GROUP BY clause is required by default
If aggregated data is requested in the SELECT statement, a GROUP BY clause is automatically assumed by the server
No DISTINCT keyword is required BI Server always issues SELECT DISTINCT to eliminate duplicate rows automatically
Testing and Validating a
Repository
BI Server Logical SQL SELECT SELECT
-
OBIEE10g Metadata Modeling Basics 127
Testing and Validating a
Repository
Summary
In this lesson, we have learned : How to execute the steps to test and validate a repository
-
OBIEE10g Metadata Modeling Basics 128
Testing and Validating a
Repository
Labs - Overview
This lesson is accompanied with following labs: Testing and validating new repository (along with deployment) Generating inconsistent repository (business model) and fixing consistency errors
-
OBIEE10g Metadata Modeling Basics 129
Describe normalized and de-normalized table structures in database designs Add multiple sources to a logical table source (LTS) for a dimension/fact in business model Topic : Adding a second logical table source to logical table - will be covered in Aggregation lesson
Adding Multiple Logical Table
Sources
Lesson Objectives
-
OBIEE10g Metadata Modeling Basics 130
Normalized table structures (usually transactional systems - OLTP): Consists of many tables where data has been split or normalized Are used for inserts and updates Does not work well for queries that perform business data analysis Could occur also in dimensional model (snowflake)
De-normalized table structures (DWH - dimensional model): Follows more 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
Adding Multiple Logical Table
Sources
Table Structures
-
OBIEE10g Metadata Modeling Basics 131
Data may be spread across several physical tables and needs to be mapped to a single logical table
Adding Multiple Logical Table
Sources
Business Challenge
-
OBIEE10g Metadata Modeling Basics 132
Model multiple physical sources for the logical table: Add multiple sources/tables to an LTS
Where data is not duplicated across tables Add a new logical table source
Where data is duplicated across tables (aggregated tables, fragmented data....)
Adding Multiple Logical Table
Sources
Business Solution
-
OBIEE10g Metadata Modeling Basics 133
Add normalized table that store geographical attributes for customer (country, subregion, region) to Customers dimension in SH business model
Adding Multiple Logical Table
Sources
Logical Table Source (LTS)
-
OBIEE10g Metadata Modeling Basics 134
1. Import additional tables 2. Define keys and joins 3. Identify physical columns for mappings 4. Add sources/tables to a logical table source:
Manual method Drag method
5. Rename logical columns 6. Add columns to the Presentation layer
Adding Multiple Logical Table
Sources
Implementation Steps: Adding Multiple Sources to an LTS
-
OBIEE10g Metadata Modeling Basics 135
Import additional table, that contains geographical attributes for Customers
Adding Multiple Logical Table
Sources
1. Import additional tables
-
OBIEE10g Metadata Modeling Basics 136
Define the keys and joins for the imported table(s)
Adding Multiple Logical Table
Sources
2. Define Keys and Joins
-
OBIEE10g Metadata Modeling Basics 137
Identify columns in the Physical layer with the additional geographical information for customer
Adding Multiple Logical Table
Sources
3. Identify Physical Columns for Mappings
-
OBIEE10g Metadata Modeling Basics 138
There are alternative methods , how you can add sources to an LTS: Manual: Use the Properties dialog box of Logical Table Source (LTS) to map tables and columns Drag: Drag columns from the Physical layer to LTS to automatically map tables and columns
Adding Multiple Logical Table
Sources
4. Adding Sources to an LTS
-
OBIEE10g Metadata Modeling Basics 139
Create a new logical column for a logical dimension table
Adding Multiple Logical Table
Sources
4a. Manual: Create New Logical Column
-
OBIEE10g Metadata Modeling Basics 140
Use the Properties dialog box of a logical table source to add a new physical table to the source
Adding Multiple Logical Table
Sources
4a. Manual: Add New Physical Source
-
OBIEE10g Metadata Modeling Basics 141
Use the Properties dialog box of a logical table source to map a new logical column to a physical column in the new table within LTS
Adding Multiple Logical Table
Sources
4a. Manual: Create Column Mapping
-
OBIEE10g Metadata Modeling Basics 142
LTS CUSTOMERS now maps to two physical tables: CUSTOMERS and COUNTRIES Logical column Country maps to COUNTRY_NAME physical column in COUNTRIES physical table
Adding Multiple Logical Table
Sources
4a. Manual: End Result
-
OBIEE10g Metadata Modeling Basics 143
Drag physical columns to a logical table source
Adding Multiple Logical Table
Sources
4b. Drag Method
-
OBIEE10g Metadata Modeling Basics 144
Dragging physical columns to LTS automatically creates logical columns in BMM layer
Adding Multiple Logical Table
Sources
4b. Drag Method: Logical Columns Added
-
OBIEE10g Metadata Modeling Basics 145
Dragging physical columns to LTS automatically adds physical tables to LTS
Adding Multiple Logical Table
Sources
4b. Drag Method: Physical Tables Added
-
OBIEE10g Metadata Modeling Basics 146
Dragging physical columns to LTS automatically adds column mappings to LTS
Adding Multiple Logical Table
Sources
4b. Drag Method: Column Mappings Added
-
OBIEE10g Metadata Modeling Basics 147
Rename new logical columns with names that are meaningful to users (not necessary for manual method)
Adding Multiple Logical Table
Sources
5. Rename Logical Columns
-
OBIEE10g Metadata Modeling Basics 148
Drag new logical column(s) to Customer presentation table to make it(them) available to users
Adding Multiple Logical Table
Sources
6. Add Columns to Presentation Layer
-
OBIEE10g Metadata Modeling Basics 149
Adding Multiple Logical Table
Sources
Summary
In this lesson, we have learned : Describe normalized and de-normalized table structures in database designs Add multiple sources to LTS for a dimension in the business model
-
OBIEE10g Metadata Modeling Basics 150
Adding Multiple Logical Table
Sources
Labs - Overview
This lesson is accompanied with following labs: Importing normalized table that contain additional geographical information for customer to Physical layer, defining physical keys and joins Creating multiple sources (adding table) to LTS using manual method
-
OBIEE10g Metadata Modeling Basics 151
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
Adding Calculations to a Fact
Lesson Objectives
-
OBIEE10g Metadata Modeling Basics 152
Physical schema may not have everything required for your analysis Adding columns into physical tables may require additional integration or ETL work Deriving a metrics in such scenario may be more efficient than storing values in the database
Average Order Size: Divide Revenue by Number of Orders
Adding Calculations to a Fact
Derived Metrics
-
OBIEE10g Metadata Modeling Basics 153
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 Expose calculation measures to the Presentation layer so that users can formulate business questions in Answers by using familiar terminology
Adding Calculations to a Fact
OBIEE solution
-
OBIEE10g Metadata Modeling Basics 154
"XYZ Selling Tigers" wants to track a calculated measure Gross Profit, that calculates the difference between Amount Sold and Unit Cost (stored in table COSTS) multiplied by Quantity Sold : Gross Profit = Amount Sold - (Unit Cost * Quantity Sold)
Adding Calculations to a Fact
"XYZ Selling Tigers" Scenario
-
OBIEE10g Metadata Modeling Basics 155
Calculation measures can be created using 2 different methods: Existing logical columns as objects in a formula Physical columns as objects in a formula
You can use as well Calculation Wizard to automate the process of creation of comparison measures (comparing 2 existing measures/logical columns)
Adding Calculations to a Fact
Implementation Methods
-
OBIEE10g Metadata Modeling Basics 156
1. Create a new logical column 2. Specify logical columns as the source 3. Build a formula
Adding Calculations to a Fact
Steps for Using Existing Logical Columns
-
OBIEE10g Metadata Modeling Basics 157
Right-click the fact table and select New Object > Logical Column
Adding Calculations to a Fact
1. Create a New Logical Column
-
OBIEE10g Metadata Modeling Basics 158
Select "Use existing logical columns as the source" check box
Adding Calculations to a Fact
2. Specify Logical Columns as the Source
-
OBIEE10g Metadata Modeling Basics 159
Open the Expression Builder and build the calculation formula using existing logical columns (from logical tables)
Adding Calculations to a Fact
3. Build a Formula
-
OBIEE10g Metadata Modeling Basics 160
1. Create a new logical column 2. Map the new column 3. Build the formula 4. Specify an aggregation rule
Adding Calculations to a Fact
Steps for Using Physical Columns
-
OBIEE10g Metadata Modeling Basics 161
Use the Column Mapping tab of LTS dialog box to open the Expression Builder for the new column
Adding Calculations to a Fact
2. Map the New Column
-
OBIEE10g Metadata Modeling Basics 162
Build the calculation formula using physical columns
Adding Calculations to a Fact
3. Build the Formula
-
OBIEE10g Metadata Modeling Basics 163
Click the Aggregation tab and set the aggregation rule for new calculated logical column
Adding Calculations to a Fact
4. Specify an Aggregation Rule
-
OBIEE10g Metadata Modeling Basics 164
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
Adding Calculations to a Fact
Steps for Using the Calculation Wizard
-
OBIEE10g Metadata Modeling Basics 165
Right-click a logical column that you want to use in the calculation and select Calculation Wizard
Adding Calculations to a Fact
1. Open the Calculation Wizard
-
OBIEE10g Metadata Modeling Basics 166
You can choose more columns to compare with
Adding Calculations to a Fact
2. Choose the Columns for Comparison
-
OBIEE10g Metadata Modeling Basics 167
You can choose different comparison calculations (Change, Percent Change, Index, Percent), by default Change (absolute difference) and Percent Change selected You can name the calculation measures You can also choose NULL value handling
Adding Calculations to a Fact
3. Select the Calculations
-
OBIEE10g Metadata Modeling Basics 168
Final screen of an wizard with summary of what measures will be created
Adding Calculations to a Fact
4. Confirm the Calculation Measures
-
OBIEE10g Metadata Modeling Basics 169
New calculation measures are automatically added to the logical fact table
Adding Calculations to a Fact
5. New Calculation Measures Are Added
-
OBIEE10g Metadata Modeling Basics 170
Expose new calculation measures to Presentation layer regardless of the method used to create the measures
Adding Calculations to a Fact
Expose New Measures to Presentation Layer
-
OBIEE10g Metadata Modeling Basics 171
Expression builder allows you to select various expressions, operators and repository variables and use them to build the column formula
Adding Calculations to a Fact
Advanced Functions Expression Builder
Using functions
Variables can be built and used in building formula, e.g. Current Month, Last ETL Run Date etc.
-
OBIEE10g Metadata Modeling Basics 172
Use physical columns for building calculations that require an aggregation rule (such as sum or average) that is applied after the calculation
Adding Calculations to a Fact
Best practice for measures calculated from physical columns
select
T82.ItemType as c1,
sum(T55.UnitOrdd - T55.UnitShpd) as c3
from
D1_products T82,
D1_Orders2 T55
where
T55.ProdKey = T82.ProductKey and
group by
T79.ItemType
Calculates the difference between units ordered and units shipped
Applies aggregation rules on top of the calculated values
-
OBIEE10g Metadata Modeling Basics 173
Example: To accurately calculate total revenue you would multiply the unit price by the number of units sold and then sum the totals
Adding Calculations to a Fact
Example of measures calculated from physical columns
-
OBIEE10g Metadata Modeling Basics 174
Use logical columns for calculation formulas that require an aggregation rule that is applied before the calculation
Adding Calculations to a Fact
Best practice for measures calculated from logical columns
Select
distinct D1.c1 as c1, D1.c2 as c2. D1.c3 as c4,
(D1. c2 D1.c3) as c4
From (
select
T82.ItemType as c1,
sum(T55.UnitOrdd) as c2,
sum(T55.UnitShpd) as c3
from
D1_products T82,
D1_Orders2 T55
where
T55.ProdKey = T82.ProductKey and
group by
T79.ItemType ) D1
First partial measures are aggregated
And then final calculation (difference) is used with aggregated measures
-
OBIEE10g Metadata Modeling Basics 175
Example: To accurately calculate unit price, sum Total Price and Units Sold first and then divide Total Price by Units Sold to determine Unit Price
Adding Calculations to a Fact
Example of measures calculated from logical columns
-
OBIEE10g Metadata Modeling Basics 176
Adding Calculations to a Fact
Summary
In this lesson, we have learned : About a calculation measure and its use in a business model How to create new calculation measures based on existing logical columns How to create new calculation measures based on physical columns How to create new calculation measures by using the Calculation Wizard
-
OBIEE10g Metadata Modeling Basics 177
Adding Calculations to a Fact
Labs - Overview
This lesson is accompanied with following labs: Creating Calculation Measures by Using Physical Columns Creating Calculation Measures by Using Physical Columns
-
OBIEE10g Metadata Modeling Basics 178
Creating Dimension Hierarchies
and Level-Based Measures
Lesson Objectives
Create dimension hierarchies Create level-based measures Create rank and share measures
-
OBIEE10g Metadata Modeling Basics 179
Defines parent-child relationships within a dimension Establishes levels for data groupings and calculations Provides paths for drilldown
Creating Dimension Hierarchies
and Level-Based Measures
Dimension Hierarchies
Years
Quarters
Months
Days
Period Dimensional Hierarchy
Le
ve
ls
-
OBIEE10g Metadata Modeling Basics 180
Level-based hierarchy, general hierarchy style where a dimensional column act as the parent to a child level column
Unbalanced (or ragged) hierarchy, is a hierarchy where the leaves (members with no children) do not necessarily have the same depth. Skip-level hierarchy, is a hierarchy where there are members that do not have a value for a particular ancestor level.
Value-based hierarchy (Parent Child Hierarchy), uses the same dimension column for all levels but based on relational tables (parent-child relationship table) in the data model to identify the parent-child relationship. In OBIEE10g metadata, only level-based (balanced, not ragged) hierarchy is supported for modeling
Creating Dimension Hierarchies
and Level-Based Measures
Types of Hierarchies
-
OBIEE10g Metadata Modeling Basics 181
Are columns whose values are calculated (aggregated) always at a specific level of hierarchy
Creating Dimension Hierarchies
and Level-Based Measures
Level-Based Measures
Period Dimensional Hierarchy Levels
Grand Total
Years
Quarters
Months
Days
Measures
All Period Revenue
Year Revenue
Quarter Revenue
Month Revenue
Day Revenue
-
OBIEE10g Metadata Modeling Basics 182
Creating Dimension Hierarchies
and Level-Based Measures
Share Measures
Are calculated by dividing a measure by a level-based measure to calculate a percentage contribution of a measure to its upper level aggregation
-
OBIEE10g Metadata Modeling Basics 183
Creating Dimension Hierarchies
and Level-Based Measures
Dimension Hierarchy: Example
This is an example of a dimension hierarchy based on Products dimension table
-
OBIEE10g Metadata Modeling Basics 184
Creating Dimension Hierarchies
and Level-Based Measures
logical dimensions : Dim - Channels Dim - Customers Dim - Products Dim - Promotions Dim - Times
-
OBIEE10g Metadata Modeling Basics 185
Creating Dimension Hierarchies
and Level-Based Measures
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. Add measures to the Presentation layer 12. Test share measures
-
OBIEE10g Metadata Modeling Basics 186
Creating Dimension Hierarchies
and Level-Based Measures
1. Create a Dimension Object
Alternative methods are: Right-click the business model object and select New Object> Dimension (recommended) Right-click the logical dimension table and select Create Dimension
-
OBIEE10g Metadata Modeling Basics 187
Creating Dimension Hierarchies
and Level-Based Measures
2. Add a Parent-Level Object
Create the highest (top) level of the hierarchy first
-
OBIEE10g Metadata Modeling Basics 188
Creating Dimension Hierarchies
and Level-Based Measures
3. Add Child-Level Objects
Add subsequent(child) levels in the hierarchy
-
OBIEE10g Metadata Modeling Basics 189
Creating Dimension Hierarchies
and Level-Based Measures
4. Determine the Number of Elements
Part of previous step (3. Add Child-Level Objects) There are two methods for determining the number of elements for a dimension level:
Using result from "Update Row Counts" operation (this operation is usually used just for small amount of data) Estimate Levels - only accessible when working in online mode
Update Row Counts Estimate Levels
-
OBIEE10g Metadata Modeling Basics 190
Creating Dimension Hierarchies
and Level-Based Measures
5. Specify Level Columns
Specify which columns in the logical dimension table are associated with particular level in the dimension hierarchy
-
OBIEE10g Metadata Modeling Basics 191
Creating Dimension Hierarchies
and Level-Based Measures
6. Create Level Keys
Level keys: Define the unique identifier for the level Provide context for drilldown (specifies the subset of data to include from the next level down)
-
OBIEE10g Metadata Modeling Basics 192
Creating Dimension Hierarchies
and Level-Based Measures
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 (quite rarely used)
-
OBIEE10g Metadata Modeling Basics 193
Creating Dimension Hierarchies
and Level-Based Measures
8. Create Level-Based Measures
Example: Create a level-based measure for the Grand Total level of particular dimension (Product) that refers to an existing logical fact column
-
OBIEE10g Metadata Modeling Basics 194
Creating Dimension Hierarchies
and Level-Based Measures
8. Create Level-Based Measures
How level-based measure appears in Answers request
-
OBIEE10g Metadata Modeling Basics 195
Creating Dimension Hierarchies
and Level-Based Measures
9. Create Additional Level-Based Measures
Create other level-based measures to make measures from various levels of various dimensions (and for various "based" measures) available simultaneously in queries using same process as in previous point
-
OBIEE10g Metadata Modeling Basics 196
Creating Dimension Hierarchies
and Level-Based Measures
10. Create Share Measures
Create a new logical fact column that calculates the share by dividing the -appropriate measure by a total measure (level-based measure) this is an example of measure, calculated from logical columns
-
OBIEE10g Metadata Modeling Basics 197
Creating Dimension Hierarchies
and Level-Based Measures
11. Add Measures to the Presentation Layer
Expose new measures to Presentation layer so they can be used by end users
-
OBIEE10g Metadata Modeling Basics 198
Creating Dimension Hierarchies
and Level-Based Measures
12.Test share measures
In Answers, select measures to test (share measure along with corresponding level-based measure) and then drill down to check relative recalculations
-
OBIEE10g Metadata Modeling Basics 199
Creating Dimension Hierarchies
and Level-Based Measures
Summary
In this lesson, we have learned : How to create dimension hierarchies How to create level-based measures How to create share measures
-
OBIEE10g Metadata Modeling Basics 200
Creating Dimension Hierarchies
and Level-Based Measures
Labs - Overview
This lesson is accompanied with following labs: Creating Dimension Hierarchies Creating Level-Based Measures Creating Share Measure
-
OBIEE10g Metadata Modeling Basics 201
Using Aggregates
Lesson Objectives
Describe aggregate tables and their purpose in dimensional modeling Model aggregate tables Use the Aggregate Persistence Wizard to create aggregates
-
OBIEE10g Metadata Modeling Basics 202
Using Aggregates
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 (example: users often requests total products by region by year ) 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 (thus leads to end user dissatisfaction with BI application)
-
OBIEE10g Metadata Modeling Basics 203
Using Aggregates
Business Solution: Aggregate Tables
Create physical tables that store pre-computed aggregates at required levels Use these "aggregate" tables to process user queries
Eliminates run-time calculations Delivers faster results to the users
Summarized
Office Year Total
Dollars
West 1998 100000
West 1999 200000
Central 1998 50000
Id Office
Key
Time
Key
Product
Key Dollars
122222 1001 19980102 100 100000
133333 1001 19990105 200 200000
144444 1002 19980505 300 10000
155555 1002 19980601 400 20000
166666 1005 19980101 600 20000
-
OBIEE10g Metadata Modeling Basics 204
Using Aggregates
BI Server Aggregate Navigation
Enables queries to use the information stored in aggregate tables automatically BI Server decides which tables provide the fastest answers Metadata must be configured for aggregate navigation
-
OBIEE10g Metadata Modeling Basics 205
Using Aggregates
Aggregated Facts
Aggregated sales fact table columns store precomputed results at a given set of levels
Total
Organization
Department
Total
Year
Month
Week
Day
Total
Brand
LOB
Type
Detail
Dim
en
sio
n H
iera
rch
ies
Company
Product Hierarchy Office
Hierarchy
Time Hierarchy
-
OBIEE10g Metadata Modeling Basics 206
Using Aggregates
Modeling Aggregates
Model aggregate tables in the same way as other source data Physical layer:
Import physical table Create physical joins
BMM layer: Add sources to logical tables Specify aggregation content - identifies the level of aggregation in the table so BI Server can determine when to use it for queries
Presentation layer: No changes: Aggregate navigation is independent of Presentation layer objects
Test the results
New step
-
OBIEE10g Metadata Modeling Basics 207
Using Aggregates
Uses prebuilt aggregate tables to improve performance Must have matching levels of aggregation for fact and dimensions Simplified scenario:
Materialized View CAL_MONTH_SALES_MV aggregates Amount Sold by Month This MV will serve as LTS for aggregated fact and as well as
Times)
-
OBIEE10g Metadata Modeling Basics 208
Using Aggregates
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
-
OBIEE10g Metadata Modeling Basics 209
Using Aggregates
1. Import Tables
Import fact and dimension aggregates
dimension (so no join between fact and dimension at physical layer will be defined see next step)
-
OBIEE10g Metadata Modeling Basics 210
Using Aggregates
2. Create Joins
Use the Physical Diagram to create joins between aggregate fact table and aggregate dimension tables
dimension - thus no join between fact and dimension at physical layer will be defined)
-
OBIEE10g Metadata Modeling Basics 211
Using Aggregates
3. Create Fact Logical Table Source and Mappings
Create new aggregate LTS in the existing logical fact table and map the columns
-
OBIEE10g Metadata Modeling Basics 212
Using Aggregates
4. Specify Fact Aggregation Content
Specify the aggregation content of the new fact LTS, so that BI Server knows what level of data is stored in the aggregate tables (to make optimal decision, which source to use for query)
-
OBIEE10g Metadata Modeling Basics 213
Using Aggregates
5. Specify Content for the Fact Detail Source
Set the levels of the fact detail LTS to the lowest levels in hierarchies
-
OBIEE10g Metadata Modeling Basics 214
Using Aggregates
6. Create Dimension Logical Table Source and Mappings
Create new aggregate LTS in the existing logical dimension tables and map the columns
dimension LTS