Tuesday 16 September 2014

OBIEE 11g Evaluate Function Error

Error : Formula syntax is invalid
[nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. EVALUATE_SUPPORT_LEVEL inside NQSConfig.INI is not set to support EVALUATE. (HY000)

SQL Issued: SELECT EVALUATE('LEAST(%1,%2)', 1, 2) FROM "Disclosures - Encumbered Assets"

Resolution 

Change the setting in the nqsconfig.INI

location of File : $MW_HOME/instances/instance1/config/OracleBIServerComponent/coreapplication_obis1


Edit nqsconfig.INI and Change the setting to 2

# EVALUATE_SUPPORT_LEVEL:
# 1: evaluate is supported for users with manageRepositories permssion
# 2: evaluate is supported for any user.
# other: evaluate is not supported if the value is anything else.

EVALUATE_SUPPORT_LEVEL = 2; 

Save changes and Restart the OPMN Services

--Start Services

$MW_HOME/instances/instance1/bin/opmnctl stopall
--Stop Services

nohup $MW_HOME/instances/instance1/bin/opmnctl startall &



Thursday 21 August 2014

OBIEE 11g: Multiple dashboard prompts with single Apply and Reset Button


Single apply and reset button for multiple dashboard prompts:

Generally each single dashboard prompt has Apply and Reset button.
Refer the screenshot:


We need to hide those apply and reset button. 

Steps to follow :
1.Don't hide "Apply" button from the dashboard.
    If you hide "Apply" button, values pass automatically from prompts to reports.
2.Hide "Reset" button from the dashboard.
Java script code for creating APPLY and RESET button:

Hide & Stop passing the values until click on the "Apply" button. For that follow the code

<style type="text/css">.PromptViewCell .button{display:none}</style>

For Single "Apply" button and the  functionality as follows,

<DIV CLASS = "XUIPromptEntry minibuttonOn">
<input class="button" type = "button" value = "Apply" onclick='javascript:

try


var aElm=PromptManager.getPromptManager().getAllPromptCollectionJSON();

   for(var i = 0; i < aElm.length; i ++ )

  {

   {


     for(var j = 0; j < aElm[i].promptSteps[0].prompts.length;      j ++ )


     {


  var promptid =    aElm[i].promptSteps[0].prompts[j].promptStreamID   ;

      var g = null;
      var h = PromptManager.getPromptManager().getPromptCollectionInfoWithViewID(aElm[i].viewStatePath);

        if(h)

       {
          try
 {
  var b = h.getAllPromptExprsArray();
  if( ! h.verifyPromptValuesAndDisplayError(b))
 {
   return
     }
          g = PromptManager.buildPromptExprGivenExpr(" ", b)
         }
         catch(f)
         {
           alert(f);
           return
     }
        }

       PromptManager.submitPrompt(aElm[i].viewStatePath, true, "PromptFinish", g)

     }

    }

  }
}

catch(e) {alert("Apply ALL Button Exception " + e.description);}'></input>

<input class="button" type = "button"  value = "Reset" ONCLICK = 'return PersonalizationEditor.removeDefaultSelection(false)' > </input>
</DIV>



Settings with Apply And Reset Button:
                         
 1.Apply Button:




2.Reset Button:



3.Criteria and Filters:




4.Text box:1 for hiding apply button script:




5.Text box:2 for Creating Apply And Reset  button script:




6. Dashboard page creation :




7. Final result on dashboard: 





Kindly share your feedback if it helps..
Enjoy coding..!!




Thursday 17 July 2014

BMM Layer Concepts

       
     Buissness Model And Mapping Layer:

    ü  All columns in logical fact tables are aggregated measures, except for keys required by external clients, or dummy columns used as a divider.
    ü  Outer joins are always defined in the Business Model and Mapping layer
    ü  BMM layer has Complex joins (specified as Outer joins).

Aggregate Table:

ü  Aggregate tables store pre calculated measures that have been aggregate over a set of dimensional attributes.
ü  This is very useful technique for speeding up query response time in decision support systems.
ü  This eliminates the need of run time calculations and delivers faster results to users.
ü  The calculations are done ahead of time and the results are stored in the tables.

Aggregate navigation:
ü  The aggregate navigation capability of the Oracle BI Server allows queries to use the information stored in aggregate tables automatically.
ü  To ensure aggregate navigation, a single logical column will have multiple physical column table sources (one for the fact and one for the aggregate). 
ü  OBI Server will know which physical column to choose according to the granularity of the relevant table sources: aggregated table or detail fact table.

Level Based Measures:
ü  A measure column is a column with an aggregate function. Any column with an aggregation rule is a measure. 
ü  We can add level based measure in dimensions. Level Based measure is a column whose values are always calculated to a specific level of aggregation.
LTS (logical table source):
ü  Logical table sources define the mappings from a single logical table to one or more physical tables.
ü  The mapping between physical columns and logical columns are done in this element.
ü  One of the uses of multiple LTS is converting a snow flake schema to star schema.
ü  The definition of the logical table source is used:
Ø  to specify transformations/calculations (in the column mapping tab),
Ø  to enable aggregate navigation and fragmentation (in the content tab)


Wednesday 16 July 2014

Aliases and Duplicate in OBIEE


Difference between aliases and duplicate tables:

Alias Table
Duplicate Table
It’s a mirror image of the Parent Table
It’s a Copy of the Parent Table
We can't edit or modify Alias Table
We can edit/modify/delete columns in Duplicate table
It refers to physical table and created at physical layer of RPD
It doesn’t refer to physical table and created at all levels of RPD
It doesn’t create views.
It creates views using select statement.
Changes made in Parent Table is automatically reflected in Alias table
Changes made in Parent table are not reflected in Duplicate table
Used : When there is a need to avoid self-join or circular join
Used when there is a need to use few columns of Parent table.


Wednesday 9 July 2014

Agents, KPI, Scorecards, Writeback, OCI and ODBC

     Agents:
ü  Agents deliver targeted analytics to users based on a combination of schedule and trigger event. Delivery can be by a variety of routes, for example to Dashboard Alerts or to email.
ü  Agents enable you to automate your business processes.
ü  You can use them to provide event-driven alerting, scheduled content publishing, and conditional event-driven action execution.
ü  You can choose:
1.      A schedule that the Agent runs on
2.      A data condition that determines what the Agent does
3.      An analysis that can be distributed
4.      Actions that can be automatically executed depending on whether the data condition is met
ü  Agents can dynamically detect information-based problems and opportunities, determine the appropriate individuals to notify, and deliver information to them through a wide range of devices (email, phones, and so on).

KPI and Scorecards:
KPI:
      A KPI is a measurement of a particular business process which is compared against specific goals and objectives of an organization. KPI’s are typically tracked over time as a way to monitor performance and drive business decisions to help improve upon that performance. KPI does typically have both a goal and a status that reflects performance relative to the goal.
      KPI in OBIEE 11g can be used an analysis dashboard to allow a user to view KPI performance and drill into the details to understand why a KPI value may be off target. KPI’s can also be used to automatically trigger alerts to specific users using OBIEE’s agent mechanism when KPI target values reach critical status levels.
      OBIEE KPI’s also can be configured with another new feature – Action Links – which allow the user to initiate a action based on the status of the KPI. The action link can reference another analysis, send an email, kick off a workflow, or any other process to assist in making the KPI the basis for “actionable intelligence”.

Scorecards:
      Scorecards help organizations define overall goals to improve corporate profitability or increase customer satisfaction, for example and break those goals down into a series of objectives that will enable them to meet the goals. Each of these objectives and initiatives is associated with one or more of an organization’s KPIs, so progress toward each objective can be measured.

Fragmentation in OBIEE:
ü  We use fragmentation when we have fact or dimensional data in one or more different tables or data is split in different data sources. Then each logical table source represents one data segment.
ü  You can split the query against a table or another. Very often, the table is fragmented according to the most important dimension in a star schema the time dimension.
For example, clients, in the first table are clients from A to M, in the second from M to Z.
ü  You have three sort of fragmentation:
§  Fact-based / Dimension-based fragmentation
§  Content-based / Value-based fragmentation
§  Level-based fragmentation / aggregate navigation

Write back
:
ü  It provides users of a dashboard page or an analysis with the ability to modify the data that they see in the table view. 
ü  It is the ability in OBIEE to allow the user to enter a value or values directly into a report and have those values written into the database.
ü  Values are written back to an actual physical table in the database.
ü  Only if the user has the “Write back to database privilege”, then the write back fields in the reports will editable.

Difference between OCI and ODBC:
ODBC: Open Database Connectivity, which is known as Universal Data Connector.
Accessing data in a heterogeneous environment of relational and non- relational database management systems. 
Accessing data in a heterogeneous environment of relational and non- relational database management systems. 

OCI: Oracle Call Interface Normally connects to Oracle Source. Hence, both can connect to Oracle Sources.
Oracle Call Interface (OCI) is an application programming interface (API) that lets you creates applications that use function calls to access an Oracle database and control all phases of SQL statement execution. OCI supports the data types, calling conventions, syntax, and semantics of C and C++.


Tuesday 8 July 2014

RPD Layers

Three Layers of RPD:

RPD (Repository) is divided into 3 layers

1. Physical Layer: This layer is used for
ü  Importing data
ü  Creating Aliases
ü  Building physical joins
ü  Setting up connection pool and its properties
ü  Enabling/ Disabling cache for individual table

2. BMM (Business Model & Mapping) Layer: This layer is used for
ü  Writing the business logic
ü  Creating Logical columns and tables
ü  Creating hierarchy
ü  Creating LBM (level based measures)
ü  Creating shares
ü  Creating Time series functions
ü  Creating Fragmentation on tables
ü  Creating filters on repository

3. Presentation Layer: This layer is used for
ü  Arranging the data for users view (Folder Structure)
ü  Creating Presentation hierarchy
ü  Creating Implicit Fact column
ü  Implementing Column level security

In short three layers of RDP consist of following functions:


PRESENTATION LAYER
User Roles And Preferences
Simplified Views
Logical SQL Interface
BMM LAYER
Dimensions
Hierarchies
Measures
Calculations
Aggregation Rules
Time Series Functions
PHYSICAL LAYER
Map Physical data
Connections
Schema
Aliases, Joins


Monday 7 July 2014

Slowly Changing Dimensions

Slowly Changing Dimensions (SCD):
Slowly changing dimensions are the dimensions in which the data changes slowly, rather than changing regularly on a time basis. Slowly changing dimensions (SCD) determine how the historical changes in the dimension tables are handled. 
Generally we use following three types of slowly changing dimensions like: SCD type1, SCD type 2, SCD type3.
SCD Types:
a.      SCD type 1
It is used when there is no need to store historical data in the dimension table. This method overwrites the old data in the dimension table with the new data. It is used to correct data errors in the dimension.
E.g. If you entered address for employee is Mumbai and after some time the employee address is changed then you can use SCD Type1.
EmpNo
EmpName
Address
1001
Sagar
Mumbai(India)

If new address is Pune then you can overwrite old one.
EmpNo
EmpName
Address
1001
Sagar
Pune(India)

b.      SCD type 2
SCD type 2 stores the entire history the data in the dimension table. With type 2 we can store unlimited history in the dimension table. In type 2, you can store the data in three different ways.
They are:
ü  Versioning
ü  Flagging
ü  Effective Date
SCD type 2 Versioning: In versioning method, a sequence number is used to represent the change. The latest sequence number always represents the current row and the previous sequence numbers represents the past data.
For the same example we can use SCD Type2

EmpNo
EmpName
Address
Version
1001
Sagar
Mumbai(India)
1

If new address is Pune then you can add new version data as:
EmpNo
EmpName
Address
Version
1001
Sagar
Mumbai(India)
1
1001
Sagar
Pune(India)
2

If we add new location then version no also changes.

SCD type 2 Flagging: In flagging method, a flag column is created in the dimension table. The current record will have the flag value as 1 and the previous records will have the flag as 0.

EmpNo
EmpName
Address
Flag
1001
Sagar
Mumbai(India)
1

If new address Pune is added then the old records will be updated with flag value as 0 and the latest record will have the flag value as 1.

EmpNo
EmpName
Address
Flag
1001
Sagar
Mumbai(India)
0
1001
Sagar
Pune(India)
1

SCD type 2 Effective Date: In Effective Date method, the period of the change is tracked using the start_date and end_date columns in the dimension table.

EmpNo
EmpName
Address
Start_date
End_date
1001
Sagar
Mumbai(India)
01-Mar-2010
20-Feb-2011
1001
Sagar
Pune(India)
21-Feb-2011
NULL

The NULL in the End_Date indicates the current version of the data and the remaining records indicate the past data. 

c.       SCD type 3
Only the current status and previous status of the row is maintained in the table. To track these changes two separate columns are created in the table. It maintains the most recently used record history.
EmpNo
EmpName
New address
Old address
1001
Sagar
Mumbai(India)
NULL

If you add new address Pune then data stored should look like
EmpNo
EmpName
New address
Old address
1001
Sagar
Pune(India)
Mumbai(India)


The type 3 method will have limited history and it depends on the number of columns you create.