Quantcast
Viewing latest article 9
Browse Latest Browse All 15

OBIEE: Multiple joins between same tables (Fact to Dim)

Hi all. I am finally writing a new post after more than 1 year and surprisingly it is not on SQL Server! I must confess that I am not a front-end kinda person and do not particularly enjoy doing dashboards and reports. But I recently started a new job and my first project is going to be on OBIEE.

Since I best learn by doing and diving into getting my hands dirty (instead of reading pages and pages of tutorials), I defined a new project for myself that I am not gonna bore you with. What we need to know for the sake of this post is that I have a fact table with 5 columns:

Buyer_ID

Product_ID

Seller_ID

Sale_Date

Sale_Qty

The twist here is that both Buyer_ID and Seller_ID point to the same dimension table, DimCustomer. Since we can add each table to the Physical layer of Oracle BI Administration Tool only once, I was wondering how I should model my data model in OBIEE.

Basically what we need to do is to tell OBIEE to join the fact table twice to DimCustomer:

  • First on Fact.Buyer_ID = DimCustomer.Customer_ID
  • Then on Fact.Seller_ID = DimCustomer.Customer_ID

And we already know that the physical structure of queries sent to data source is defined by how objects are related and joined to each other in Physical layer of BI Administration Tool. Therefore, we need to find a way to create 2 objects in Physical layer based on DimCustomer. Well, this is very easy: it can be done by creating an Alias based on the original DimCustomer.

 

Image may be NSFW.
Clik here to view.
Screen Shot 2015-02-03 at 1.38.25 pm

 

 

 

 

 

 

 

From here, everything is very straightforward:

  • On General tab, give the new Alias a name and make sure it is based on the physical table you want it to be by checking Source Table right under Name textbox;
  • If this Alias is going to be used as a dimension table, define the primary key of that table on Keys tab. You’ll need to enter a name in Key Name column and then choose the actual column from Columns drop-down to be the primary key of this new Alias table.

And now you are done. You’ll see a new entry in Physical layer as a table that you can use in your physical diagram and use it to define your model properly.

Hope this post will come in handy, cheers.

 

 


Filed under: BI Administration Tool, Business Intelligence, OBIEE Tagged: Alias, BI Administration Tool, Modeling, Multiple Join, OBIEE, Physical Layer Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

Viewing latest article 9
Browse Latest Browse All 15

Trending Articles