Sunday, 20 September 2015

Creating a Repository Using the Oracle Business Intelligence Administration Tool ( Part 2 )

Building the Business Model and Mapping Layer of a Repository
In this topic you use the Oracle BI Administration Tool to build the Business Model and Mapping layer of a repository.
The Business Model and Mapping layer of the Administration Tool defines the business, or logical, model of the data and specifies the mappings between the business model and the Physical layer schemas. This layer is where the physical schemas are simplified to form the basis for the users’ view of the data. The Business Model and Mapping layer of the Administration Tool can contain one or more business model objects. A business model object contains the business model definitions and the mappings from logical to physical tables for the business model.
The main purpose of the business model is to capture how users think about their business using their own vocabulary. The business model simplifies the physical schema and maps the users’ business vocabulary to physical sources. Most of the vocabulary translates into logical columns in the business model. Collections of logical columns form logical tables. Each logical column (and hence each logical table) can have one or more physical objects as sources.
There are two main categories of logical tables: fact and dimension. Logical fact tables contain the measures by which an organization gauges its business operations and performance. Logical dimension tables contain the data used to qualify the facts.
To build the Business Model and Mapping layer of a repository, you perform the following steps:
  • Create a Business Model
  • Examine Logical Joins
  • Examine Logical Columns
  • Examine Logical Table Sources
  • Rename Logical Objects Manually
  • Rename Logical Objects Using the Rename Wizard
  • Delete Unnecessary Logical Objects
  • Create Simple Measures
Create a Business Model


1.
Right-click the white space in the Business Model and Mapping layer and select New Business Model to open the Business Model dialog box.
Screenshot for Step
 
2.
Enter Sample Sales in the Name field. Leave Disabled checked.
Screenshot for Step
3.
Click OK. The Sample Sales business model is added to the Business Model and Mapping layer.
Screenshot for Step

4.
In the Physical layer, select the following four alias tables:
D1 Time
D2 Product
D3 Customer
F1 Revenue

Do not select D4 Address at this time.
Screenshot for Step

5 .
Drag the four alias table from the Physical layer to the Sample Sales business model in the Business Model and Mapping layer. The tables are added to the Sample Sales business model. Notice that the three dimension tables have the same icon, whereas the F1 Revenue table has an icon with a # sign, indicating it is a fact table.
Screenshot for Step

Examine Logical Joins


1.
Right-click the Sample Sales business model and select Business Model Diagram > Whole Diagram to open the Business Model Diagram.
 
2 .
If necessary, rearrange the objects so that the join relationships are visible.
Screenshot for Step
Because you dragged all tables simultaneously from the Physical layer onto the business model, the logical keys and joins are created automatically in the business model. This is because the keys and join relationships were already created in the Physical layer. However, you typically do not drag all physical tables simultaneously, except in very simple models. Later in this tutorial, you learn how to manually build logical keys and joins in the Business Model and Mapping layer. The process is very similar to building joins in the Physical layer.

3.
Double-click any one of the joins in the diagram to open the Logical Join dialog box. In this example the join between D1 Time and F1 Revenue is selected.
Screenshot for Step
Notice that there is no join expression. Joins in the BMM layer are logical joins. Logical joins express the cardinality relationships between logical tables and are a requirement for a valid business model. Specifying the logical table joins is required so that Oracle BI Server has necessary metadata to translate logical requests against the business model into SQL queries against the physical data sources. Logical joins help Oracle BI Server understand the relationships between the various pieces of the business model. When a query is sent to Oracle BI Server, the server determines how to construct physical queries by examining how the logical model is structured. Examining logical joins is an integral part of this process. The Administration Tool considers a table to be a logical fact table if it is at the “many” end of all logical joins that connect it to other logical tables.

4 .
Click OK to close the Logical Join dialog box.

5 .
Click the X to close the Business Model Diagram.

Examine Logical Columns


1 .
Expand the D1 Time logical table. Notice that logical columns were created automatically for each table when you dragged the alias tables from the Physical layer to the BMM layer.
Screenshot for Step

Examine Logical Table Sources


1 .
Expand the Sources folder for the D1 Time logical table. Notice there is a logical table source, D1 Time. This logical table source maps to the D1 Time alias table in the Physical layer.
Screenshot for Step

2 .
Double-click the D1 Time logical table source (not the logical table) to open the Logical Table Source dialog box.
Screenshot for Step

3 .
On the General tab, rename the D1 Time logical table source to LTS1 Time. Notice that the logical table to physical table mapping is defined in the "Map to these tables" section.
Screenshot for Step

4 .
On the Column Mapping tab, notice that logical column to physical column mappings are defined. If mappings are not visible, select Show mapped columns.
Screenshot for Step

5 .
You learn more about the Content and Parent-Child Settings tabs later in this tutorial when you build logical dimension hierarchies. Click OK to close the Logical Table Source dialog box. If desired, explore logical table sources for the remaining logical tables.
Screenshot for Step

Rename Logical Objects Manually
1.
Expand the D1 Time logical table.
Screenshot for Step
 
2.
Click on the first logical column, BEG_OF_MONTH_WID, to highlight it.
Screenshot for Step
3.
Click on BEG_OF_MONTH_WID again to make it editable.
Screenshot for Step
4 .
Rename BEG_OF_MONTH_WID to Beg of Mth Wid. This is the manual method for renaming objects. You can also right-click an object and select Rename to manually rename an object.
Screenshot for Step
Rename Objects Using the Rename Wizard
1 .
Select Tools > Utilities > Rename Wizard > Execute to open the Rename Wizard.
Screenshot for Step
 
2 .
In the Select Objects screen, click Business Model and Mapping in the middle pane.
Screenshot for Step
3 .
Expand the Sample Sales business model.
Screenshot for Step
4 .
Expand the D1 Time logical table.
Screenshot for Step
5 .
Use Shift+click to select all of the logical columns except for the column you already renamed, Beg of Mth Wid.
Screenshot for Step
6 .
Click Add to add the columns to the right pane.
Screenshot for Step
7 .
Repeat the steps for the three remaining logical tables so that all logical columns from the Sample Sales business model are added to the right pane. Only the columns from F1 Revenue are shown in the screenshot.
Screenshot for Step
8 .
Click Next to move to the Select Types screen.
Screenshot for Step
Notice that Logical Column is selected. If you had selected other object types, such as logical tables, the type would have appeared here.
9 .
Click Next to open the Select Rules screen.
Screenshot for Step
10 .
In the Select Rules screen, select All text lowercase and click Add to add the rule to the lower pane.
Screenshot for Step
11 .
Add the rule Change each occurrence of '_' into a space.
Screenshot for Step
12 .
Add the rule First letter of each word capital.
Screenshot for Step
13 .
Click Next to open the Finish screen. Verify that all logical columns will be named according to the rename rules you selected.
Screenshot for Step
14 .
Click Finish.
15 .
In the Business Model and Mapping layer, expand the logical tables and confirm that all logical columns have been renamed as expected. The screenshot shows only the columns in D1 Time.
Screenshot for Step
16 .
In the Physical layer, expand the alias tables and confirm that all physical columns have not been renamed. The point here is you can change object names in the BMM layer without impacting object names in the Physical layer. When logical objects are renamed, the relationships between logical objects and physical objects are maintained by the logical column to physical column mappings.
Screenshot for Step
Delete Unnecessary Logical Objects
1 .
In the BMM layer, expand Sample Sales > F1 Revenue.
Screenshot for Step
 
2 .
Use Ctrl+Click to select all F1 Revenue logical columns except for Revenue and Units.
Screenshot for Step
3 .
Right-click any one of the highlighted logical columns and select Delete. Alternatively you can select Edit > Delete or press the Delete key on your keyboard.
Screenshot for Step
4 .
Click Yes to confirm the delete.
Screenshot for Step
5 .
Confirm that F1 Revenue contains only the Revenue and Units columns.
Screenshot for Step
Create Simple Measures

1 .
Double-click the Revenue logical column to open the Logical Column dialog box.
Screenshot for Step
 
2 .
Click the Aggregation tab.
Screenshot for Step
3 .
Change the default aggregation rule to Sum.
Screenshot for Step
4 .
Click OK to close the Logical Column dialog box. Notice that the icon has changed for the Revenue logical column indicating that an aggregation rule has been applied.
Screenshot for Step
5 .
Repeat the steps to define the SUM aggregation rule for the Units logical column.
Screenshot for Step
Measures are typically data that is additive, such as total dollars or total quantities. The F1 Revenue logical fact table contains the measures in your business model. You aggregated two logical columns by summing the column data.
6 .
Save the repository without checking global consistency.
Congratulations! You have successfully built a business model in the Business Model and Mapping layer of a repository and created business measures.

Building the Presentation Layer of a Repository
You have created the initial Sample Sales business model in the repository. You now create the Presentation layer of the repository. The Presentation layer exposes the business model objects in Oracle BI user interfaces so that users can build analyses and dashboards to analyze their data.
To build the Presentation layer you perform the following steps:
  • Create a Subject Area
  • Create Presentation Tables
  • Create Presentation Columns
  • Rename Presentation Columns
  • Reorder Presentation Columns
Create a Subject Area
1 .
Right-click the white space in the Presentation layer and select New Subject Area to open the Subject Area dialog box.
Screenshot for Step
 
2 .
On the General tab, enter Sample Sales as the name of the subject area.
Screenshot for Step
3 .
Click OK to close the Subject Area dialog box. The Sample Sales subject area is added to the Presentation layer.
Screenshot for Step
Create Presentation Tables
1.
Right-click the Sample Sales subject area and select New Presentation Table to open the Presentation Table dialog box.
Screenshot for Step
 
2.
On the General tab, enter Time as the name of the presentation table.
Screenshot for Step
3 .
Click OK to close the Presentation Table dialog box. The Time presentation table is added to the Sample Sales subject area.
Screenshot for Step
4 .
Repeat the process and add three more presentation tables: Products, Customers, and Base Facts.
Screenshot for Step

Please note that you are using the manual method for creating Presentation layer objects. For simple models it is also possible to drag objects from the BMM layer to the Presentation layer to create the Presentation layer objects. When you create presentation objects by dragging from the BMM layer, the business model becomes a subject area, the logical tables become presentation tables, and the logical columns become presentation columns. Note that all objects within a subject area must derive from a single business model.

Create Presentation Columns
1.
In the BMM layer, expand the D1 Time logical table.
Screenshot for Step
 
2.
Use Ctrl+ Click to select the following logical columns:
Calendar Date
Per Name Half
Per Name Month
Per Name Qtr
Per Name Week
Per Name Year.
Screenshot for Step
3 .
Drag the selected logical columns to the Time presentation table in the Presentation layer.
Screenshot for Step

4 .
Repeat the process and add the following logical columns to the remaining presentation tables:
Products: Drag Brand, Lob, Prod Dsc, Type from D2 Product.
Customers: Drag Cust Key, Name from D3 Customer.
Base Facts: Drag Revenue, Units from F1 Revenue.
Screenshot for Step

Rename Presentation Columns
1.
In the Presentation layer, expand the Products presentation table.
Screenshot for Step
 
2.
Double-click the Lob presentation column to open the Presentation Column dialog box. On the General tab notice that "Use Logical Column Name" is selected. When you drag a logical column to a presentation table, the resulting presentation column inherits the logical column name by default. In this example the Lob presentation column inherits the name of the logical column "Sample Sales"."D2 Product"."Lob".
Screenshot for Step
3 .
Deselect Use Logical Column Name. The Name field is now editable.
Screenshot for Step

4 .
Enter Line of Business in the Name field.
Screenshot for Step

5 .
Click OK to close the Presentation Column dialog box. Notice that the presentation column name is now changed to Line of Business in the Presentation layer.
Screenshot for Step

6 .
In the BMM layer, expand D2 Product. Notice that the Lob logical column name is not changed. The point here is you can change object names in the Presentation layer without impacting object names in the BMM or Physical layers.
Screenshot for Step

7 .
In the BMM layer, rename the Prod Dsc logical column to Product. Notice that the name change is inherited by the corresponding presentation column.
Screenshot for Step

8 .
Make the following name changes to logical objects in the BMM layer so that the names of the corresponding presentation columns are also changed:
For the D3 Customer logical table:
Change Cust Key to Customer Number.
Change Name to Customer Name.
Screenshot for Step

9 .
Confirm that the corresponding presentation column names are changed.
Screenshot for Step

Reorder Presentation Columns

1.
In the Presentation layer, double-click the Time presentation table to open the Presentation Table dialog box.
Screenshot for Step
 
2.
Click the Columns tab.
Screenshot for Step
3 .
Select columns and use the up and down arrows, or drag the columns. to rearrange the presentation columns into the following order from top to bottom:
Per Name Year
Per Name Half
Per Name Qtr
Per Name Month
Per Name Week
Calendar Date
Screenshot for Step

4 .
Click OK to close the Presentation Table dialog box and confirm that the presentation column order is changed in the Presentation layer.
Screenshot for Step

5 .
Repeat the steps to reorder the columns in the Products presentation table:
Brand
Line of Business
Type
Product
Screenshot for Step

6 .
Save the repository without checking global consistency.
Congratulations! You have successfully built the Presentation layer of a repository.

No comments:

Post a Comment