You are on page 1of 3

1.

Go To Manage-->Joins 2.Select physical layer--> complex join in corresponding Schema at left pane 3. Right Click and select for new Complex Join in the right Pane. 4. Give the complex Join name and select the tables for join 5. Use the expression window for Query. 6. Save and Check.

2. Understanding Complex Join and Physical Join in OBIEE


3. What is the difference between complex join and physical join? The easiest way to understand the basic is to remember that physical join is used in Physical layer and complex join is used in BMM layer. However, just knowing that isn't going to be enough to build solid skills on OBIEE development. In order to gain more insight on how it really works in OBIEE, we need to know more about these 2 types of joins. First, let's look at complex join:

The diagram is a window of a typical complex join. In here, you notice that you can't change any of the table columns of neither logical tables in the join and the expression pane is grayed out. However, you are able to change the type of join from inner to outer joins. This type of behavior is telling us that complex join is a logical join that OBIEE server looks at to determine the relationship between logical tables, in other words, it is just a placeholder. Complex join will not be able to tell the server what physical columns are used in joining, but it will be able to tell the server what type of join this is going to be.. In order to know how exactly the join is, we will need to look at physical join in the physical layer:

Notice that in this window of physical join, we are able to change the columns under both tables, we are also able to define our own expressions. However, are can't change the joining method unlike complex join. This behavior is to help us to know that this is where we tell OBIEE how to join the 2 actual tables by specifying the columns. Hence this is what physical join does. Knowing the basic, let's take a step further. Can I use complex join in physical layer or can I use physical join in BMM layer? Yes we can, and by doing it the application will not flag errors. However, we need to know when to use them and what to expect after using them.. Let's look at complex join in physical layer. Although it doesn't happen frequently, it is sometimes needed. Let's say we have 2 tables, promotion fact and contract date dimension. I want to join these 2 tables in such way so that only the dates that are still in contract should return. Therefore, I can't just use a simple join on the date columns from both tables, conditions need to be applied.. In this case, let's use complex join in physical layer:

In the below diagram, I enter 'PTS_DATES.COMPANYDATEID >= PTS_STAR_FACTS.CONTRACTSTARTDATEID AND PTS_DATES.COMPANYDATEID <= PTS_STAR_FACTS.CONTRACTENDDATEID' to satisfy the joining condition. At the front end, when you run a report using these tables, this expression will be included in the where clause of the SQL Statement:

Having physical join in BMM layer is also acceptable, however it is very rare to see that happen. The purpose of having physical join in BMM layer is to override the physical join in physical layer. It allows users to define more complex joining logic there than they could using physical join in physical layer, in other words, it works similar to complex join in physical layer. Therefore, if we are already using complex join in physical layer for applying more join conditions, there is no need to follow this set up with physical join in BMM layer again. Remember, the best data modeling design in OBIEE is not the most complex and overly convoluted design, it should be as straightforward as possible. Therefore, use physical join in physical layer and complex join in BMM layer as much as you can. Only when situation calls for a different join, then go for it.

4. 5.

What is a complex join in OBIEE?

6.
7.

A Complex Join in used in the Business Model & Mapping Layer (BMM layer) in the repository. Logical tables in a BMM layer can have multiple logical tables sources (LTS). Complex join actually is an intelligent join between LTSs of two logical tables in BMM Layer. When two columns are selected for a query in Answers/Dashboard, BI Server reads the complex join between two logical tables and then intelligently & dynamically selects the LTSs to join. This means that the BI server is able to select the most efficient join in the physical layer and translate query into a physical SQL.

8. 9. 10. 11. 12. 13. 14. 15. 16. 17.

What happens when a Foreign Key Join is defined in BMM Layer? If a physical join (foreign key join) is used in the BMM layer, then BI Server will always select this physical join to create the SQL even when it is not the most efficient one.

When is a complex join used in Physical Layer of OBIEE? Complex join is used when we want to use join expressions e.g. we want to use less than or greater than operators. A complex join is used while using slowly changing dimension, the expression is then used to define date ranges.

You might also like