Wednesday, January 23, 2013

Best Practices in Presentation Layer(OBIEE)

  • Catalog should map to one Business Model & Mapping Layer (BMM) Layer objects only.
  • Use Parent Folders and Sub folders to group Facts and similar Dimensions together.
  • Avoid the use of Aliases when a new Presentation Column is created.
  • The Presentation Columns in a table should be sorted alphabetically if no specific order is asked by the customer.
  • Get Customer Sign-off of the Presentation layer structure before building reports. This will avoid later replacements of columns which affects the reports constructed.
  • Make proper use of the Permissions in this layer.
  • Don’t use Double quotes (“) in Column name, though its permitted.
  • Presentation columns should not have the same name as Presentation Table.
  • Eliminate unneeded objects to reduce user confusion.
  • Limit Number of objects in folder to 7-12.
  • Use Object  description field to convey information to users when they hover the mouse in Answers on a Presentation column.
  • Keep names short to have space on reports.
  • Give the meaning table names and columns names to identify easily on subject areas.
  • Try to create separate folder for each data mart (HR, Operation, SCM, sales) if it is coming from same Business Model & Mapping Layer.
  • Remove primary key columns and other unnecessary columns that doesn't going to use in the creation of the reports.

Best Practices in BMM Layer(OBIEE)

  • Minimize the use of Snow-Flakes. Always go for Star Schema's.
  • Always use Complex joins here. It allows OBI Server to make best decision about the exact physical SQL to be generated based on Logical query Path. In contrast to a Physical FK join, these forces a single join path between tables. If joined tables were dragged from Physical Layer, replace FK Joins with complex Joins.
  • Create Dimension Hierarchies for every Dimension in the Business Model.
  • Even if a meaningful hierarchy definition cannot be thought of, just create one with the Grand Total Level and Detail Level.
  • For Dimension Hierarchies the ‘Number of Elements at this level’ should increase from 1 at Grand Total to the corresponding distinct values at each level. This can be approximate values; need not be the exact ones.
  • Define Keys at each level of the Hierarchy.
  • The Content tab of each of the LTSs in Fact should be set to the related Dimension’s Logical Level.
  • Combine all attributes that describe a single entity into a single Logical table.
  • Never delete logical columns that map to keys of Physical dimension tables.
  • Don’t keep unwanted Physical columns in the Logical Layer.
  • Give Meaningful Names to the Logical Columns. Avoid assigning a logical column the same name as a logical table or Business Model object.
  • Make proper use of the where clause Content filter of the LTS to minimize number of records returned.
  • Minimize the use of Conditional Checks and ‘CASE WHEN’ usage in the formula of Logical Columns. This will affect performance. Instead make proper use of the where clause Content filter of the LTS if the condition applies to all the columns/measures in the logical table.
  • When Creating a logical column based on other logical columns , make sure all the columns in the expression is from the Same logical table, same Logical Table Source.
  • Make proper distinction between Count and Count Distinct. If you are counting on a unique value column don’t use Count Distinct. This will affect performance.
  • Minimize the use of Outer joins within LTS. This is resource consuming. Use default zero ROW_WID records at the database instead.
  • Make sure a particular Report only refers one LTS in a Logical Table. Or the different LTSs should be at the same level.
  • Avoid dimensions in Fact tables and avoid measures in Dimension Tables.
  • Create Display folders to group tables according to STAR or Releases.
  • When using Out-of-the -Box Vanilla RPD, remove unwanted Logical Tables and Hierarchies. This will minimize the time needed for Consistency Check.
  • Specify the most Economical Source when there are multiple LTSs for a Dimension.
  • Whenever you do Consistency Check, Right Click the Changed Business Model Object and go for Check Consistency rather than using the Global Consistency Check. This will minimize the time needed for Consistency Check.
  • Arrange the logical columns alphabetically. This will save time when you revisit.
  • Fix the warnings if any, don’t ignore it.

Best Practices in Physical Layer(OBIEE)

In this post I am sharing some of the best practices to follow while we are in OBIEE solutions.
  •  Try to always import tables and columns into Physical layer rather than creating it manually.
  •  This will ensure correct data types are set for each column. This is particularly useful when there is confusion between DATE and DATETIME.
  • For each Physical Dimension table there should be a Primary Key and only one. For Fact Tables, there is no need to create a Primary Key.
  • If only composite key is present create a single Physical key and add all the composite key columns in it.
  • Minimize Opaque Views (SELECT statements) in Physical Layer.
  • Create Tables (recommended) or  Materialized views in data-warehouse instead.
  • Always use Foreign Key Joins in the Physical layer. Avoid using complex joins with conditions.  Complex joins are not good for performance and should be avoided. (there are a few exceptions for this case when we work with Type 2 SCD).
  • Always try to use Number-Number join. This will work faster than a varchar-varchar join.
  • Avoid using CAST functions in the join expression. This will destroy the usability of the Database indexes created on that column.
  • Avoid any filter conditions in the Join.
  • These filter conditions can in turn be added in the LTS (Logical Table Source) ‘Where’ clause content filter or as request filter in Reports.
  • Facts should not be joined . This will result in Cartesian Product leading to double counting and summing.
  • Use conforming Dimensions instead.
  • Connection Pool considerations (15-18).
  • Require fully qualified table names should be unchecked.
  • Enable Connection Pooling should be checked.
  • Execute queries asynchronously should be checked.
  • Create a separate Connection Pool for Initialization Blocks.
  • Keep Cache persistence time of all tables as Infinite.
  • The columns used in Joins should be set to “NOT NULL”.
  • The database Features tab should be set correctly with the Parameters supported by your backend database.
  • If both are not in-sync then lot of processing will be done in the BI Server instead of the Database. This affects Performance. Pay particular attention to Locale. (They are case-sensitive).Mismatch of Locale can cause the sorting to be done in OBI Server instead of DB and performance take a bad hit!
  • DERIVED_TABLES_SUPPORTED in database features tab should be  checked for Oracle Databases. This will ensure that Proper function shipping will happen to the DB in case of TOP(N) and Rank functions.
  • Create Display folders to group tables according to STAR or Releases.
  • Set Different Icons on objects for each Release of the Code. This will ensure in finding which entity was added in which release.
  • Don’t Leave the Description field empty. Write some meaningful descriptions of the Object. This will help a lot in later trouble-shooting and Impact Analysis.

Usage of GO URL Syntax in OBIEE Environment

This section discusses various techniques for integrating Oracle OBIEE content into external web content using the GO URL syntax available in OBIEE. Note that OBIEE should be in Single Sign On with the external application otherwise authentication information is also required as part of this URL syntax. Most of this is also documented in OBIEE Web administrator guide, just some additional examples and few additional syntax are provided here and also putting them all at one place
Integrating Analytics Reports using Go URL syntax
Analytics supports a versatile “Go URL” syntax to incorporate Analytics content into external portals.
  • Go URL with parameters can be posted as a Form or
  • Issue it as a URL with parameters.
If you are issuing parameters as part of a URL, they need to be escaped properly.
Calling GO URL:
When calling from within Analytics Dashboard or HTML view simply use the URL
saw.dll?GO
When calling from another screen from the same Web server then use the syntax
/analytics/saw.dll?Go
When calling from a different Web server the use full syntax:
http://server_name_or_ip_address/Analytics/saw.dll?Go
Authentication with the GO URL
It is assumed that Analytics Web site has Single Sign On (SSO) enabled within corporate web-sites.Single Sign On authentication information is not required as a part of the “Go URL”. If Single Sign On is not enabled then additional authentication parameters must be supplied with the Go URL
http://server_name_or_ip_address/Analytics/saw.dll?Go&NQuser=xxx&NQPassword=xxx
Structure of the Go URL
Basic structure of the Go URL is as follows:
saw.dll?Go&Path=/Shared/Training/ParameterReport
Here, the path is the catalog path for the Analytics report ParameterReport. This basic URL syntax displays the default result view for the report in standard style.
There are number of optional arguments to this URL syntax
Displaying Report Results in different format
Display ‘Modify’, Download’ ‘Print’, ‘Refresh’ options along with the report
saw.dll?Go&Path=/Shared/Training/ParameterReport&Options=mdr
Print report in HTML format
saw.dll?Go&Path=/Shared/Training/ParameterReport&Action=print
Print in xx format, where xx=PDF,Excel, mht or xml
saw.dll?Go&Path=/Shared/Training/ParameterReport&Action=print&format=pdf
saw.dll?Go&Path=/Shared/Training/ParameterReport&Action=print&format=excel
saw.dll?Go&Path=/Shared/Training/ParameterReport&Action=print&format=mht
saw.dll?Go&Path=/Shared/Training/ParameterReport&Action=print&format=xml
Download report directly in the xx Format where xx= Excel, csv or mht
saw.dll?Go&Path=/Shared/Training/ParameterReport&Action=download&format=csv
saw.dll?Go&Path=/Shared/Training/ParameterReport&Action=download&format=excel
saw.dll?Go&Path=/Shared/Training/ParameterReport&Action=download&format=mht
Note: Download does not support filters to be passed from the GO URL
Showing specific view of the report:
saw.dll?Go& Path=/Shared/Training/ParameterReport &ViewName=pivot
Displaying all the records in a table view:
saw.dll?Go&Path=/Shared/Training/ParameterReport &Action=Scroll&P5=-1&ViewID=go~Table
Displaying Dashboard or Dashboard Pages:
Syntax for displaying entire Dashboard or specific Dashboard pages URL syntax is:
saw.dll?Dashboard&PortalPath=/shared/Training/_Portal/Training
Displaying specific Dashboard page:
saw.dll?Dashboard&PortalPath=/shared/Training/_Portal/Training&Page=Sales%20by%20Region
Displaying specific Dashboard page in PDF format:
saw.dll?Dashboard&PortalPath=/shared/Training/_Portal/Training&Page=Sales%20by%20Region&Action=print&format=pdf
Passing Parameters to the Report using Go URL optional argument
The Go URL can also be used to pass context such as filters to a destination request. This is done by adding additional parameters to the call. You need to make sure that any columns you are passing are set up in the destination with Is Prompted filters, or specific default filters. Up to 6 parameters can be passed to the target report
New syntax for GO URL in addition passing the parameters only supported in OBIEE 10.1.3.2 or above
New syntax for Go URL in Analytics. You can now pass as many parameters and values as you want
note the syntaxt &col1=&val1=
http://webserver/analytics/saw.dll?Go&Path=%2Fshared%2FSupplier%2FRegionDollars&Action=Navigate&col1=Periods.%22Year%22&val1=%221999%22&op1=eq&nquser=Administrator&nqpassword=Administrator
Also an operator can be included in the URL, default is ‘eq’ if op1 etc. are not included
http://webserver /analytics/saw.dll?Go&Path=%2Fshared%2FSupplier%2FRegionDollars&Action=Navigate&col1=Periods.%22Year%22&val1=%221998%22&op1=gt&nquser=Administrator&nqpassword=Administrator
The syntax is pretty flexible and can include as many parameters and operators there is no limit.
http://webserver/analytics/saw.dll?Dashboard&PortalPath=%2Fusers%2Fadministrator%2F_portal&Page=TestPrompts&Action=Navigate&col1=Markets.Region&val1=%22EASTERN%20REGION%22&col2=Markets.District&val2=%22PHILADELPHIA%20DISTRICT%22&col3=Markets.Market&val3=%22PHILADELPHIA%22&col4=Periods.%22Year%22&val4=%222001%22&col5=Periods.%22Month%22&val5=%222001-03-01%22&col6=Periods.Week&val6=%22WEEK%20ENDING%2003%2F10%2F01%22&col7=Products.Type&val7=%22COATINGS%22&col8=Products.Brand&val8=%22Enterprise%22&col9=Products.UPC&val9=%22Enterprise%20Steel%20Gloss%22&nquser=Administrator&nqpassword=Administrator
 -------------------------------------------------------------------------------------------
http://webserver/analytics/saw.dll?Go&Path=%2Fusers%2Fadministrator%2FAllPromptTestReport&Action=Navigate&col1=Markets.Region&val1=%22EASTERN%20REGION%22&col2=Markets.District&val2=%22PHILADELPHIA%20DISTRICT%22&col3=Markets.Market&val3=%22PHILADELPHIA%22&col4=Periods.%22Year%22&val4=%222001%22&col5=Periods.%22Month%22&val5=%222001-03-01%22&col6=Periods.Week&val6=%22WEEK%20ENDING%2003%2F10%2F01%22&col7=Products.Type&val7=%22COATINGS%22&col8=Products.Brand&val8=%22Enterprise%22&col9=Products.UPC&val9=%22Enterprise%20Steel%20Gloss%22&nquser=Administrator&nqpassword=Administrator

Old syntax for passing parameters works both in OBIEE and previous releases e.g. 7.7, 7.8, 10.1.3.1 etc.
Pass one parameter:
saw.dll?Go&Path=/Shared/Training/ParameterReport&Action=Navigate&P0=1&P1=eq&P2=Periods.Year&P3=1+1999
Pass 2 parameters:
saw.dll?Go&Path=/Shared/Training/ParameterReport&Action=Navigate&P0=2&P1=eq&P2=Periods.Year&P3=1+1999&P4=eq&P5=Customers.State&P6=1+CA
Here the operator P1=eq can be of different type as documented in the Siebel Analytics Web Admin guide e.g. like, lt, gt etc.
saw.dll?Go&Path=/Shared/Training/ParameterReport&options=md&Action=Navigate&P0=2&P1=eq&P2=Customers.State&P3=1+CA&P4=like&P5=Products.Type&P6=1+”B%”
Include the numeric parameter value in “ e.g. &P2=Periods.Year&P3=”1998”
Also position Like operator at the end of the parameter list.
Passing parameter to a Dashboard prompt:
If a Dashboard is using prompts then values can be passed to it similar to above syntax as follows:
http://webt43/analytics/saw.dll?Dashboard&PortalPath=/shared/Training/_Portal/Training&Page=Filters&Action=Navigate&P0=1&P1=eq&P2=Products.Type&P3=Beef
Issuing Direct SQL to Siebel Analytics using URL syntax:
Following URL syntax can also be used to directly issue a SQL against Analytics
saw.dll?Go&SQL=select+Region,Dollars+from+SupplierSales
following URL will bypass web cache and issued directly to the Analytics server
saw.dll?Go&IssueRawSQL=select+Region,Dollars+from+SupplierSales
Calling BI Publisher reports directly similar to GO URL
URL to directly call a BI Publisher report.
It will prompt the login screen if BI publisher is not single sign-on with the calling app
http://webserver:9704/xmlpserver/Business+Intelligence/Paint+Demo/Paint+Demo.xdo
Calling BI publisher report from OBIEE URL similar to Go URL syntax
Use ExecuteReportObject syntax
http://webserver/analytics/saw.dll?ExecuteReportObject&Path=/Business%20Intelligence/Paint%20Demo/Paint%20Demo.xdo
New syntax for Go URL in Analytics. You can now pass as many parameters and values as you want
note the syntaxt &col1=&val1=
http://webserver/analytics/saw.dll?Go&Path=%2Fshared%2FSupplier%2FRegionDollars&Action=Navigate&col1=Periods.%22Year%22&val1=%221999%22&nquser=Administrator&nqpassword=Administrator
Calling a Dashboard page works the same way.
If Page has some prompts then those can also be filtered using new syntax
http://webserver/analytics/saw.dll?Dashboard&PortalPath=%2Fusers%2Fadministrator%2F_portal&Page=page2&Action=Navigate&col1=Periods.%22Year%22&val1=%221999%22
If a page has only a BI publisher report and also has a prompt then
You can pass filters to the BI publisher report using Go URL syntax as below
http://webserver/analytics/saw.dll?Dashboard&PortalPath=%2Fusers%2Fadministrator%2F_portal&Page=page2&Action=Navigate&col1=Periods.%22Year%22&val1=%221999%22