Category Archives: John Minkjan
OBIEE11g Golden Rules: RPD-Business Model Layer
First of al the original inspiration for these “Golden Rules” Series are based on the “20 GOLDEN RULES FOR REPOSITORY DESIGN” from the people at Peak Indicators. Kudos to them.
The series contains:
- RPD-Physical Layer
- RPD-Business Model Layer
- RPD-Presentation Layer
- Report Building
- Dashboard Building
- Catalog Management
The “rules” is this article are somewhat in random order
This is always a “work in progress” and please feel free to make any suggestions!
Business Model Layer
- Prefix Logical Tables
All Logical Tables should be prefixed. There are several naming convention's in use:
- “Dim – “, “Fact – “ or “Fact Compound –“
- “D## name”, “F## name” or “FC## name”
- No “physical” column names
No “physical” column names should ever be seen on the Business Model layer. All naming conventions should be “business oriented”. For example use “$ Revenue” rather than “DOLLARS” .
- No Primary or Surrogate Physical Keys
Physical Primary Keys or Surrogate Keys should not be present on the Business Model layer (unless, for example, you have a Primary Key such as Order Id which will be displayed on reports)
- Logical Keys
Dimension Logical Tables must always have a Logical Key assigned. The Logical Key should be something “business oriented” such as “Employee Login” rather than “EMPLOYEE_PK”
- No Facts in dimensions
Dimension Logical Tables must only contain dimension attributes, they should never contain any measure columns (which have an Aggregate Rule)
- No Logical Keys on facts
Fact Logical Tables should not have a Logical Key assigned.
[UPDATE: ] As far as I know this is because the OBIEE optimizer uses the logical key to determine the "driving" table. No logical keys on fact tables should ensure the "correct" optimizer path. Please correct me if I’m misinformed.
- Aggregation Rules on Facts
Every Logical Column within a Fact Logical Table must be a measure column, and therefore have an Aggregation Rule assigned.
- Only Complex Joins
When defining Logical Joins between Logical Tables, only use “Complex Joins” (and use the default settings – you only ever specify a “Driving Table” when dealing with cross-database joins)
- No Snowflakes
The Business Model should only consist of logical star-schemas, there should not be any snow-flaking
- Hierarchies on Dimensions
Every Dimension Logical Table should have a corresponding Dimension Hierarchy (with “Total” as a Grand Total level, and “Detail” at the lowest level)
- Number of Elements
Each level of a Dimension Hierarchy should have its “Number of Elements” appropriately set (there is a utility in Tools that can do this automatically).
- Content Levels
Every Logical Table Source within every dimension and fact Logical Table should have its “Content Levels” appropriately set. The only time the “Content Level” is not set for a particular dimension is when there is no logical relationship existing
- Multiple facts tables
Do not merge all your measures into a single Fact Logical Table. For example, you should split “Forecast Sales” and “Actual Sales” measures into two Logical Tables e.g. “Fact – Sales” and “Fact – Forecast”
- Description fields
All available description field should have meaningful descriptions with non technical users.
Till Next Time
OBIEE11g Golden Rules: RPD-Physical Layer
First of al the original inspiration for these “Golden Rules” Series are based on the “20 GOLDEN RULES FOR REPOSITORY DESIGN” from the people at Peak Indicators. Kudos to them.
The series contains:
- RPD-Physical Layer
- RPD-Business Model Layer
- RPD-Presentation Layer
- Catalog Structure
- Report Building
- Dashboard Building
The “rules” is this article are somewhat in random order
This is always a “work in progress” and please feel free to make any suggestions!
Physical Layer
- Clear the cache check box
Using cache should be a last resource, reconsider your data model and ETL processes first!
- Always use “Foreign Key” joins, not “Complex Joins” on the Physical Layer
If your join looks like D_DATE = TRUNC(S_DATETIME) try add a extra column S_DATE in your DWH. Any matching processing done by the BI-server costs time and you often loose the advantage of an index in your DWH.
- Prefix your tables
When modelling a star-schema data-model, create aliases for all your physical tables (prefixed with either “Dim_”, “Fact_” or “Fact_Agg_” )
- Physical Display Folder
Use Physical Display Folder to organise your stars
- Call Interface
When possible, configure your connection pools to use a “native driver” to connect to your physical databases. For example, use OCI for connecting to an Oracle database rather than ODBC.
- Parameterize your data source name
This way you only have to change it in one place when moving from development to production.
- 3NF in DWH
Try to avoid doing 3NF to Star Schema Modelling in the Physical Layer. Flatten the table if possible during the ETL or in a view on the database.
- Connecting User
The User you use to connect to your data should by default not by the “owner” of the table, but should have only select rights trough a role.
Till Next Time
OBIEE obips_config_base.xsd
Good Sunday afternoon reading, locate you obips_config_base.xsd and open it read only in a text editor (or download the PDF here).
It' contains loads of info on the instanceconfig.xml tags.
Have a special look at the <!-- Top Secret, Do NOT Expose On Penalty Of Dismissal (throw away) –> stuff
(Kudos to the genius who left them in the normal download )
Till Next Time
OBIEE11g Blocking a formula
In http://obiee101.blogspot.com/2011/09/obiee11g-blocking-analyses-based-on.html I showed you the possibilities to block an analyses based on criteria system wide. In this article I want show how to block an analyses based on the editing of a formula.
A large part of the criteria editor is controlled by the criteriatemplate.xml
the kuiColumnFormulaEditorHead generates a web message reference to kuiFormulaBlockingScript
In order to use this reference you will have to create a new web message in on of your custom xml files:
<WebMessage name="kuiFormulaBlockingScript" translate="no">
<HTML>
<script type="text/javascript" src="fmap:myformulablocking.js" />
</HTML>
</WebMessage>
This effectively creates a “fork out” to a javascript (.JS) file. You can place this java script file in the ORACLE_INSTANCE\bifoundation\OracleBIPresentationServicesComponent\coreapplication_obipsn\analyticsRes directory.
Let’s start with a simple example:
// http://obiee101.blogspot.com
// This is a formula blocking function.
// It makes sure the user does not enter an unacceptable formula.
function validateAnalysisFormula(sFormula, sAggRule)
{
alert(sFormula);
alert(sAggRule);
return true;
}
//
It basically returns the formula you enter:
and the Aggregation rule you selected.
Based on this info you can block for instance the usage from EVALUATE functions: (based on example for 10g found here:http://prolynxuk.com/blog/?p=413) (note: EVALUATE can be a security risk if the connection pool user have certain database roles…..)
// http://obiee101.blogspot.com
// This is a formula blocking function.
// It makes sure the user does not enter an unacceptable formula.
function validateAnalysisFormula(sFormula, sAggRule)
{
// alert(sFormula);
// alert(sAggRule);
// Donot allow EVALUATE function
var evaluateRe = "EVALUATE";
var nEvaluate = sFormula.search(evaluateRe);
if (nEvaluate >= 0)
{
alert("You used Evaluate function and is not allowed.");
return false;
}
return true;
}
Till Next Time