lab 2 business model and mapping layer obiee

47
OBI EE Lab Material Lab 2 - Building the Business Model and Mapping Layer of a Repository If you are following the sequence and have completed the Lab 1 of OBI EE, then please ignore the “Prerequisites.Doc” steps. However, if you are directly starting with this lab, then please read the “Prerequisites.doc” and perform the steps mentioned in the document. In this lab, we shall perform the following steps to build the Business Model and Mapping layer: Create a Business Model Create Logical Tables Create Logical Columns Create Logical Joins Rename Business Model Objects Delete Unnecessary Business Model Objects Build Dimension Hierarchies Create a Business Model To create a new business model, perform the following steps: 1. In the Business Model and Mapping layer, right-click the white space and select New Business Model. 2. In the Business Model dialog box, name the business model SH and leave the Available for queries box unchecked. The Description edit box is used to add a comment for yourself or another developer. Leave it empty.

Upload: parimal-mukunda

Post on 17-Jan-2016

26 views

Category:

Documents


1 download

DESCRIPTION

OBIEE

TRANSCRIPT

Page 1: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

Lab 2 - Building the Business Model and Mapping Layer of a Repository

If you are following the sequence and have completed the Lab 1 of OBI EE, then please ignore the “Prerequisites.Doc” steps. However, if you are directly starting with this lab, then please read the “Prerequisites.doc” and perform the steps mentioned in the document.

In this lab, we shall perform the following steps to build the Business Model and Mapping layer:

Create a Business Model Create Logical Tables Create Logical Columns Create Logical Joins Rename Business Model Objects Delete Unnecessary Business Model Objects Build Dimension Hierarchies

Create a Business Model

To create a new business model, perform the following steps:

1. In the Business Model and Mapping layer, right-click the white space and select New Business Model.

2. In the Business Model dialog box, name the business model SH and leave the Available for queries box unchecked. The Description edit box is used to add a comment for yourself or another developer. Leave it empty.

Page 2: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

3. Click OK to close the Business Model dialog. The new SH business model appears in the Business Model and Mapping layer. The red symbol on the business model indicates it is not yet enabled for querying. You enable the business model for querying later after the Presentation layer is defined and the repository passes a global consistency check.

Page 3: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

Create Logical Tables

To create a new logical table, perform the following steps:

1. In the Business Model and Mapping layer, right-click the SH business model and select New Object > Logical Table.

2. In the Logical Table dialog box, name the table Sales Facts.

Page 4: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

3. Click OK to close the Logical Table dialog. The Sales Facts logical table appears in the SH business model in the Business Model and Mapping layer. The Sources folder is populated in the next step when you create a logical column.

Page 5: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

Create Logical Columns

To create a logical column, perform the following steps:

1. In the Physical layer, expand the Sales physical table.

2. Select the column AMOUNT_SOLD.

3. Drag the AMOUNT_SOLD column from the Physical layer to the Sales Facts logical table in the Business Model and Mapping layer. A new AMOUNT_SOLD logical column is added to the Sales Facts logical table.

Page 6: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

4. Expand the Sources to see the logical table source that was created automatically when you dragged the AMOUNT_SOLD column from the Physical layer. Logical table sources define the mappings from a logical table to a physical table. A logical table’s Sources folder contains the logical table sources. Because you dragged a column from the Physical layer, the logical table source name, SALES, is the same name as the physical table. However, it is possible to change names in the Business Model and Mapping layer without impacting the mapping.

5. In the Business Model and Mapping layer, double-click the AMOUNT_SOLD logical column to open the Logical Column dialog box.

Page 7: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

6. Click the Aggregation tab.

Page 8: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

7. In the Default aggregation rule drop down list, select SUM.

8. Click OK to close the Logical Column dialog box. Notice that the logical column icon is changed to indicate an aggregation rule is applied.

Page 9: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

Create Logical Joins To create logical joins in the business model, perform the following steps:

1. Select the following tables in the Physical layer. Select only these tables:

CHANNELS, CUSTOMERS, PRODUCTS, PROMOTIONS, TIMES

2. Drag the selected tables from the Physical layer onto the SH business model folder in the Business Model and Mapping layer. This automatically creates logical tables in the Business Model and Mapping layer. Notice that each logical table has a yellow table icon. In the Business Model and Mapping layer, this indicates a fact table. Because you have not yet created the logical joins, all table icons are yellow. The icon color for dimension tables changes to white in a later step when you create logical joins.

3. Right-click the SH business model and select Business Model Diagram > Whole Diagram.

Page 10: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

4. Rearrange the table icons so they are all visible. Place the Sales Facts table in the middle. Adjust the zoom factor, if desired.

5. Click the New Complex Join button in the toolbar.

6. Click the Channels table icon first and then click the Sales Facts table icon in the Logical Table Diagram window. The order is important. The second table clicked is the many side of the relationship. The Logical Join dialog box opens. Leave the default values as they are, but note which properties you can set: name, business model, tables, driving table, join type, and cardinality. Also note which

Page 11: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

properties you cannot set: the join expression and the join columns. Typically, when defining logical joins, you leave the defaults as they are.

7. Do not change the default values, click OK, and verify your work in the Logical Table Diagram. Notice that the fact table, Sales Facts, is at the many end of the join:

Page 12: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

8. Repeat the steps for the remaining tables. Your final result should look similar to the picture.

9. Click the X in the upper right corner to close the Logical Table Diagram. Notice that the color of the table icons for the dimension tables has changed to white in the business model. In a business model, a yellow icon indicates a fact table and a white icon indicates a dimension table. Defining the join relationships determined which tables are the logical dimension tables and which is the logical fact table. A fact table is always on the many side of a logical join. You now have a logical star schema consisting of one logical fact table, Sales Facts, and five logical dimension tables: Channels, Customers, Products, Promotions, and Times.

10. Save the SH repository. Do not check global consistency.

Page 13: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

Rename Business Model Objects To use the Rename Wizard to rename the objects in the business model, perform the following steps:

1. Click Tools > Utilities.

2. In the Utilities dialog box, click Rename Wizard and then Execute.

3. In the Rename Wizard, click the Business Model and Mapping tab and select the SH business model.

Page 14: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

4. Click the Add Hierarchy button.

Page 15: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

5. Click Next.

6. Click Select None.

7. Check Logical Table and Logical Column.

Page 16: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

8. Click Next.

9. Select All text lowercase.

Page 17: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

10. Click Add.

Page 18: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

11. Click Change specified text. In the Find box, type an underscore. In the Replace box, type a space.

12. Click Add.

Page 19: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

13. Click First letter of each word capital and click Add.

Page 20: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

14. Click Change specified text. In the Find box, type a space and the letters Id. In the Replace With box, type a space and the letters ID. Check Case sensitive.

Page 21: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

15. Click Add.

Page 22: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

16. Click Next and review changes.

Page 23: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

17. Click Finish and verify that logical tables and logical columns in the Business Model and Mapping layer are changed as expected.

18. Save the repository. Do not check global consistency.

Page 24: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

Delete Unnecessary Business Model Objects To delete logical columns that are not needed in the business model, perform the following steps:

1. For the Channels logical table in the Business Model and Mapping layer, use Ctrl + click to select the Channel Class ID and the Channel Total ID logical columns.

2. Right-click either of the highlighted columns and select Delete to delete the columns. Alternatively, you can use the Delete key on your keyboard.

Page 25: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

3. Click Yes to confirm the delete.

4. Verify that the Channels logical table now has only four logical columns.

5. Repeat the steps to delete the following logical columns in the Customers table:

Cust City ID

Cust State Province ID

Country ID

Cust Main Phone Number

Cust Total ID

Cust Src ID

Cust Eff From

Cust Eff To

Cust Valid

Page 26: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

6. Place the cursor over the icon to display the screenshot and verify that the Customers logical table has only the following logical columns:

7. Place the cursor over the icon to display the screenshot and repeat the steps to delete the highlighted logical columns in the Products table.

Page 27: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

8. Place the cursor over the icon to display the screenshot and verify that the Products logical table has only the following logical columns:

9. Place the cursor over the icon to display the screenshot and repeat the steps to delete the highlighted logical columns in the Promotions table.

Page 28: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

10. Place the cursor over the icon to display the screenshot and verify that the Promotions logical table has only the following logical columns:

11. Do not delete any columns in the Times table.

12. Save the repository. Do not check global consistency.

Page 29: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

Build Dimension Hierarchies

Dimension hierarchies introduce formal hierarchies into a business model, allowing Oracle BI Server to calculate useful measures and allowing users to drill down to more detail. In a business model, a dimension hierarchy represents a hierarchical organization of logical columns belonging to a single logical dimension table. Common dimension hierarchies used in a business model are time periods, products, customers, suppliers, and so forth.

Dimension hierarchies are created in the Business Model and Mapping layer and end users do not see them in end user tools such as Oracle BI Answers or Interactive Dashboards. In each dimension hierarchy, you organize dimension attributes into hierarchical levels. These levels represent the organizational rules and reporting needs required by your business. They provide the structure that Oracle BI Server uses to drill into and across dimensions to get more detailed views of the data. Dimension hierarchy levels are used to perform aggregate navigation, configure level-based measure calculations, and determine what attributes appear when Oracle BI users drill down in their data requests.

To build the Channels dimension hierarchy in the SH business model, perform the following steps:

1. Right-click the Channels logical table and select Create Dimension.

2. Right-click the ChannelsDim object, which was created by the action in the previous step, and select Expand All.

Page 30: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

3. Place the cursor over the icon to display the screenshot and verify that the ChannelsDim dimension hierarchy matches the picture.

4. Right-click the Channels Detail level and select New Object > Parent Level.

Page 31: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

5. In the Logical Level dialog box, name the logical level Class and set the Number of elements at this level to 3. This number does not have to be exact. The ratio from one level to the next is more important than the absolute number. These numbers only affect which aggregate source is used (optimization, not correctness of queries).

Page 32: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

6. Click OK to close the Logical Level dialog box. The new Class level is added to the hierarchy.

7. Right-click the Class level and select Expand All.

Page 33: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

8. Drag the Channel Class column from the Channel Detail level to the Class level to associate the logical column with this level of the hierarchy.

9. Right-click Channel Class and select New Logical Level Key.

Page 34: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

10. In the Logical Level Key dialog box, verify that Channel Class and Use for drilldown are selected. The level key defines the unique elements in each logical level. Each level key can consist of one or more columns at this level.

Page 35: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

11. Click OK to close the Logical Level Key dialog box. The Channel Class column now displays with a key icon.

12. Right-click the Class level and select New Object > Parent Level.

13. In the Logical Level dialog box, name the logical level Channel Total Attribute and set the Number of elements at this level to 1.

Page 36: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

14. Click OK to close the Logical Level dialog box. The Channel Total Attribute level is added to the hierarchy.

15. Right-click the Channel Total Attribute level and select Expand All.

Page 37: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

16. Drag the Channel Total column from the Channel Detail level to the Channel Total Attribute level.

17. Right-click Channel Total and select New Logical Level Key.

Page 38: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

18. In the Logical Level Key dialog box, verify that Channel Total and Use for drilldown are selected.

Page 39: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

19. Click OK to close the Logical Level Key dialog box. The Channel Total column now displays with a key icon.

20. Right-click the Channel Desc column and select New Logical Level Key.

21. In the Logical Level Key dialog box, notice that Use for drilldown is selected.

Page 40: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

22. Click OK to close the Logical Level Key dialog. Both Channel Desc and Channel ID display with key icons.

23. Double-click the Channels Detail level to open the Logical Level dialog box.

Page 41: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

24. Click the Keys tab.

Page 42: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

25. Click Channels Detail_Key.

Page 43: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

26. Click the Edit button.

Page 44: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

27. In the Logical Level Key dialog box, uncheck Use for drilldown.

Page 45: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

28. Click OK to close the Logical Level Key dialog box. Notice that the key icons are different. Channel Desc is used for drill down Channels Detail_Key is not. Later, when a user drills down in Answers or a dashboard, the default drill is to the level key that has Use for drilldown checked in the next lowest level. Based on this example, when a user drills down from the Channel Class column (the next highest level), the default is to drill down to the Channel Desc column, not the Channels Detail_Key column.

Page 46: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

29. Click OK to close the Logical Level dialog box.

30. Place the cursor over the icon to display the screenshot and verify that the finished ChannelsDim hierarchy looks like the picture.

31. Save the repository. Do not check global consistency.

Page 47: Lab 2 Business Model and Mapping Layer OBIEE

OBI EE Lab Material

32. Optional: Build a dimension hierarchy for the Products logical table. Use the preceding steps, the screenshot, and the characteristics below as a guide. Don't worry if you cannot complete this step. In Part Two of this OBE, you use a different repository that already has the dimension hierarchies prebuilt.

The ProductsDim dimension hierarchy should have the following characteristics:

For the Subcategory level, set Number of elements at this level to 21.

For the Category level, set Number of elements at this level to 5.

For the Product Total Attribute level, set Number of elements at this level to 1.

For the Products Detail level, uncheck Use for drill down for Products Detail_Key (Prod ID).

Check Use for drill down for all other keys in the ProductsDim hierarchy.

If you complete this step, save the repository. Do not check global consistency.