Oracle Bi Solutions

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Sunday, 24 March 2013

OBIEE 11g - Look up Tables in obiee11g

Posted on 08:29 by Unknown
A very important feature that has been introduced in 11g is the ability to model lookup tables in the repository. If you have worked with ETL tools before, lookup tables are quite common especially when we want to do a lot of lookup operations (id to description mappings). In 10g, to model lookup tables the only way was to make inner joins (equi join or outer joins) to the lookup tables through the Logical Table sources. But now in 11g, this ability has been added to reference both physical tables and logical tables.

There are 2 types of lookup tables.

1. Sparse Lookups – A sparse lookup basically means that the main driving table does not necessarily have corresponding lookup values in the lookup table for all the id values. This can be considered to be an equivalent of a Left Outer Join.

2. Dense Lookups – A dense lookup basically means that the main driving table will have matching lookup values in the lookup table for each of its unique id value. This can be considered to be an equivalent of an inner join.

There are 2 different ways of modeling lookup tables. Lets go through each one of them in this blog entry.

1. Physical Lookups – To understand physical lookups, lets take a very simple example given below

We have 2 tables, CUSTOMERS and CUSTOMER_LKP. CUSTOMERS table has all the details of a customer with CUST_ID being the unique primary key. CUSTOMER_LKP has 3 columns CUST_ID, CUST_INCOME_LEVEL and CUST_MARITAL_STATUS with CUST_ID being the primary key. The main difference between these 2 tables is, not all customers in the main CUSTOMERS table have a corresponding income level and marital status.





To model the CUSTOMER_LKP as a lookup table, we need to first define a primary key. If there is more than one column acting as a primary key, ensure that the key contains all the columns. In the physical layer, there is no join needed on the CUSTOMERS and the CUSTOMER_LKP table.




Now, in the Business Model and Mapping layer, lets create a new column called Customer Income Level. After that is created, lets go to the LTS mapping and apply the following the function. If you have more than one column as a primary key, the order of columns used in the key should match with the column order in the Lookup function.
Lookup(
SPARSE
"ORCL - SH".."SH"."CUSTOMER_LKP"."CUST_INCOME_LEVEL" ,
'No Income Defined',
"ORCL - SH".."SH"."CUSTOMERS"."CUST_ID")


What we have done here is we have directly referenced the lookup value column in our lookup function. Since not all customers have an income level set, SPARSE is used. The basic syntax of lookup functions is given below
LOOKUP
(
SPARSE/DENSE
#Lookup Value column from the Lookup Table#,
#Default Value if there is no lookup value in the Lookup table# (only needed for SPARSE lookups),
#Primary key columns from the main table
)
Lets now create a report as shown below


Wherever the Customer Income Level is not defined those customers get defaulted to No Income Defined value. If we look at the underlying database query, there would be a left outer join that would be pushed automatically into the query due to this lookup function.




In the Physical Lookups option, the lookup operations are pushed to the database layer (wherever possible). Lets now look at the 2nd approach where the lookup operations will be pushed to the BI Server layer.

2. BMM Lookups 11g now supports doing lookup operation in its own memory by modeling a logical table as a lookup table. For example, lets consider the below currency conversion exchange rates table.



This rates table has a composite primary key. To use the BMM lookups, lets create a new logical table in the BMM layer to hold the exchange rates table as shown below




To denote a table as a BMM lookup table, we need to enable the lookup option (if you notice, there is no more bridge table check box option like in 10g but just a lookup option)



When we enable a logical table as a lookup table, that means that this logical table does not require any BMM joins to either the fact or the dimension. So we can now have standalone tables in the BMM layer in 11g.



After enabling this, lets create a new logical column for extracting the rates. Since we will have a rate for every country and day, we will use DENSE lookups in this case. The function used for doing this is given below
Lookup
(
DENSE
"SH - Lookups"."Rates Lookup"."RATE" ,
"SH - Lookups"."Customers"."COUNTRY_ISO_CODE",
"SH - Lookups"."Times"."TIME_ID"
)


The syntax for the lookup functions remain the same as the one that we used in the physical lookups. But here we need to use logical table names instead of physical table names. To use this rate as part of a FX restatement, multiply the measures with the above rate lookup column. Lets now create a report and look at the query generated





The BMM lookup is now fired as a separate query. BI Server will do the in-memory joins between the rates and the measures & will do the aggregation as well.
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in OBIEE | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Upper Function
    In Oracle/PLSQL, the  upper function  converts all letters in the specified string to uppercase. If there are characters in the string that ...
  • OBIEE 11g Hide/Show Sections based on Dashboard Prompt
    allow a user’s interaction to hide/show certain sections of a dashboard. In this particular case the user wanted to choose either ‘Quarterly...
  • [OBIEE11g] - OBIEE Dashboard for Informatica Metadata Reporting
    The metadata that Informatica Power Center 8 retains in its repository can be exposed via OBIEE reports and dashboards. This metadata includ...
  • [ODI] - Frequently Asked Questions (FAQ)
    Here is a list of FAQs about Oracle Data Integrator 1) What is Oracle Data Integrator (ODI)? 2) What is E-LT? 3) What components make up Ora...
  • OBIEE 11g not showing new dashboard in the drop down menu
    When creating New dashboard in  OBIEE 11g, I have faced with issue that dashboard name did not show up in drop down dashboard menu. 1. When ...
  • Data Modeling: Schema Generation Issue with ERwin Data Modeler 7.3
    We are using Computer Associate’s ERwin Data Modeler 7.3 for data modeling. In one of our engagements, we are pushing data model changes to ...
  • Installation Informatica Powercenter 9.1 on Oracle Enterprise Linux 5.6
    Ingredients: Program Version Filename Oracle Express 11G 11.2.0 oracle-xe-11.2.0-0.5.x86_64.rpm SQL Developer 3.0 sqldeveloper-3.0.04.34-1.n...
  • Informatica Powercenter Workflow Manager Repository Navigator docking float issue
    In case you’re also experiencing where your Repository Navigator is not dock or attached and it seems just floating within Workflow Manager ...
  • [OBIEE11g] - Creating Dashboard Traversing Through Graph
    The general requirement asked for by customers is that they want to Click on the Main Dashboard Page’s Graph and be transferred to the other...
  • OBIEE 11g - Query Limit
    Query limit and number of minutes a query can run per physical layer database connection, follow the below steps. > Login to Repository u...

Categories

  • BI Publisher
  • DAC
  • DataWarehouse
  • Hyperion
  • Informatica
  • OBIEE
  • ODI
  • Oracle Applications EBS 12.1.3
  • Oracle Database
  • PL/SQL
  • SQL
  • Unix/Linux

Blog Archive

  • ▼  2013 (500)
    • ►  November (8)
    • ►  October (1)
    • ►  July (4)
    • ►  June (9)
    • ►  May (15)
    • ►  April (24)
    • ▼  March (43)
      • EBS 12.1.3
      • OBIEE 11g - Weblogic Security Administration
      • Error: OBIEE 11g: Error: "Stream Closed" Server Ex...
      • OBIEE 11g - Oracle Map viewer Installation & Confi...
      • Hyperion - Essbase Production Server crash
      • Hyperion - EPM, Fusion Edition Performance and Tun...
      • Hyperion FAQ'S
      • Hyperion Planning 11.1.2.2 Calculation Manager Is...
      • OBIEE 11g - Hyperion Integration With OBIEE
      • OBIEE 11g - Single Sign On With (EBS)
      • Hyperion Financial Reports – Preview User Point of...
      • OBIEE 11g - Display user name and time of the repo...
      • OBIEE 11g - Getting the custom links on the OBIEE ...
      • OBIEE 11g - supports 2 kinds of clustering Vertica...
      • DAC - Replace Base: Procedure for Upgrading
      • DAC - Simplified Refresh From Base Option
      • DAC - Peer to Peer Merge
      • OBIEE 11g - User Specific UI
      • OBIEE 11g - Multiple values in single column using...
      • OBIEE 11g - Look up Tables in obiee11g
      • DAC - W_DAY_D and Configure the Multi Calendar su...
      • OBIEE 11g - Roll back Selection Security to be Enable
      • OBIEE 11g - XMLP Server Cache Control
      • OBIEE 11g - How to remotely connect to online RPD
      • BI Publisher - 10g to 11g Upgrade Process
      • OBIEE 11g - Deployment of BI Publisher reports
      • OBIEE 11g - Deinstall
      • OBIEE 11g - Uploading/calling PDF file into OBIEE ...
      • OBIEE 11g - Switching Between Multiple Reports
      • OBIEE 11g - Action link saving a report in local d...
      • OBIEE 11g - Disable Caching
      • OBIEE - Executing Stored Procedures/Functions befo...
      • How to call stored procedure from DAC?
      • OBIEE - Selecting a Single Value and Showing a Range
      • OBIEE - Handy Date Session Variables
      • OBIEE 11g - Calculated % always shows up as 0%
      • OBIEE 11g - Using a Dashboard Prompt as a Column S...
      • OBIEE 11g - How to get proper date sorting in graphs
      • OBIEE 11g - Sorting on the Total in a Pivot
      • OBIEE - Google Charts
      • OBIEE11g - Inline Microcharts using Google Charts API
      • OBIEE 11g - Dashboard Background Image or Watermark
      • NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A gen...
    • ►  February (73)
    • ►  January (323)
Powered by Blogger.

About Me

Unknown
View my complete profile