Sie sind auf Seite 1von 20

RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

Practice 6-1: Enhancing the Product Dimension


Goal To import normalized tables that contain additional product information into
the Physical layer of the repository
Scenario There are product tables that store detailed information about ABCs
products. You want to add these tables to the Product dimension in the
Business Model and Mapping layer. You import these tables into the
repository and create keys and foreign key joins for the tables.
Outcome D1_PRI CELI ST, D1_PROD_DI ET_TYPES, D1_PRODUCT_SUBTYPE,
D1_PRODUCT_TYPE, and D1_SUPPLI ERS tables imported into the Physical
layer with associated keys and joins
Time 510 minutes
Instructions
1. Ensure that Oracle BI Server is stopped.
a. Open the Services window.
b. Locate Oracle BI Server and ensure that it is stopped and the Status field has
no value.
c. Minimize Services.
2. Start the Server Administrator and open the ABC.rpd repository in offline mode.
a. Select Start > Programs > Oracle Business Intelligence > Administration.
b. Select File > Open > Offline.
c. Double-click ABC.rpd.
d. Ensure that User is Administrator and that the Password field is blank.
e. Click OK.
3. In this step, you import additional product tables that store product code, pricing,
and supplier information. The product dimension is an example of where
information has been stored physically in a normalized table structure. Data
warehouse design writers such as Ralph Kimball refer to this as snowflaking a
dimension. Many database administrators regard this as good database design, so
this is a very common practice. So far, you have only included the information in
the root product table in the logical subject area. After import, you can include
information from the other product tables.
a. Select File > Import > From Database.
b. Select the OCI 10g/11g connection type.
RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

c. In the TNS Name field, enter ORCL.
d. In the User Name field, enter SUPPLIER2.
e. In the Password field, enter SUPPLIER2.
f. Click OK. The Import dialog box opens. This may take a few moments.
g. Scroll to the SUPPLIER2 folder and expand it.
h. Select the following tables (press and hold [Ctrl]) to import:
Table Name
D1_PRICELIST
D1_PRODUCT_SUBTYPE
D1_PRODUCT_TYPE
D1_PROD_DIET_TYPES
D1_SUPPLIERS
i. Ensure that the Tables and Keys check boxes are selected.
j. Click Import. Wait for the import process to complete.
k. Click Close to close the Import dialog box.
l. Ensure that the tables were imported into the Physical layer.

m. Update row counts for the new tables.
4. Define joins and foreign keys using the Physical Diagram.
a. In the Physical layer, right-click the ORCL database and select Physical
Diagram > Object(s) and All Joins to open the Physical Diagram view.
b. Drag the new table objects so they are all visible and use the zoom feature as
needed.
c. Use the New Foreign Key button on the toolbar to create the following join
relationships. As in earlier lessons, click Yes if you are asked to create a
matching table key.
D1_PRODUCT_SUBTYPE.SUBTYPECODE =
D1_PRODUCTS.SUBTYPECODE
D1_PROD_DIET_TYPES.DIETCODE = D1_PRODUCTS.DIETCODE
D1_SUPPLIERS.SUPPLIERCODE = D1_PRODUCTS.SUPPLIERCODE
D1_PRICELIST.PRODUCTKEY = D1_PRODUCTS.PRODUCTKEY
RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

D1_PRODUCT_TYPE.TYPECODE =
D1_PRODUCT_SUBTYPE.TYPECODE
d. Check your results:

e. Close the Physical Diagram.
f. Save the repository. Do not check consistency.

RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

Practice 6-2: Creating Multiple Sources for a
Logical Table Source (Manual)
Goal To add the information from the price list table to the Product dimension
Scenario You have imported the product tables that store detailed information about
ABCs products into the Physical layer of the repository and configured keys
and joins for the tables. So far, the Product dimension in the Business
Model and Mapping layer has only information from the root product table:
D1_PRODUCTS. You are ready to add the information from the price list table
to the Product dimension, and while doing that, simplify the data structure
(in effect, creating a denormalized logical table).
Outcome In the Business Model and Mapping layer, the D1_PRI CELI ST physical
table is added to the existing logical table source for the Product dimension
and the Pr i ce logical column is added to the Product dimension and
mapped to the appropriate physical table.
Time 5 minutes
Instructions
1. In this step, you add the information from the price list table to the existing logical
table source for the Product dimension. There are two methods to add multiple
sources for an existing logical table source. In this practice, you use the Properties
window of an existing logical table source, which is a manual process and
requires several steps. In the next practice, you use a more automated process.
a. In the Business Model and Mapping layer, expand the Pr oduct s logical
table and then the Sources folder, and then double-click the D1_PRODUCTS
logical table source to view the properties.
b. Click the General tab and click Add. The Browse window automatically
includes those tables that are joined directly to the table already in the logical
table source. In this case, it includes all tables that join to D1_PRODUCTS.
Only tables that join to tables included in the logical source can be added to
the logical source. In other words, if tables do not have a join relationship in
the Physical layer to tables included in the logical source, they cannot be
added to the logical table source.
RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

c. Which product table is not visible in the browse list?



d. Why is this table not visible in the list?






e. In the Browse window, select the D1_PRICELIST table and click the Select
button. The table is added to the logical table source and the join is displayed
in the J oins section on the General tab.

f. Select the join in the J oins section. The View Details button becomes active.
g. Click View Details to open the join dialog box and view the read-only details
of the join.
h. Click Cancel to close the join dialog box.
i. To change a join to an outer join, you could use the drop-down list in the Type
column. This allows you to change the join type from inner to three kinds of
outer joins. For the purpose of these practices, leave the type as Inner. You
can think of the tables in a logical dimension table source as being like a
database view. When it formulates physical SQL, Oracle BI Server will leave
out the tables in this view that are not needed to satisfy the logical query
(join elimination), but only if the join type is Inner. When the join type is
Outer, however, Oracle BI Server will always include the tables.
RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

j. Click OK to close the Logical Table Source dialog box.
2. In this step, you create a new logical column based on the new logical table
source. Using the manual method in the previous step to add a physical table to a
logical table source neither automatically adds logical columns to the logical table
nor changes the logical to physical mapping of any existing column. Now that the
physical table that stores the pricing information has been added to the Product
logical table source, you create a new logical column and map it to the appropriate
physical table.
a. In the Business Model and Mapping layer, right-click the Products table and
select New Object > Logical Column.
b. Enter Price in the Name field and click OK.
c. Double-click theD1_PRODUCTS logical table source to open its properties
dialog box.
d. Click the Column Mapping tab.
e. If necessary, select the Show unmapped columns check box. Note that the
column you just created, Price, is not mapped to any physical column.
f. In the Logical Column section, click the ellipsis () button next to Price to
open the Expression Builder.
g. In the lower-left pane of the Expression Builder, click the Physical Tables
folder.
h. In the center pane, click D1_PRICELIST.
i. In the right pane, click PRICE.
j. Click the Insert button and examine the expression.
k. Click OK to close the Expression Builder.
l. Ensure that Show Mapped Columns is selected, and that the Price logical
column is now mapped to the PRI CE physical column in the
D1_PRICELIST physical table.

RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

m. Click OK to close the Logical Table Source dialog box.

RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

Solutions 6-2: Creating Multiple Sources for a
Logical Table Source (Manual)
Answers
1.c. Which product table is not visible in the browse list?
D1_PRODUCT_TYPE
1.d. Why is this table not visible in the list?
Because it does not have a direct join relationship with D1_PRODUCTS in
the Physical layer. The Browse window automatically includes those tables
that are joined directly to the table already in the logical table source.

RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

Practice 6-3: Creating Multiple Sources for a
Logical Table Source (Automated)
Goal To add the information from the additional product tables to the Product
dimension
Scenario You have manually added information from the price list table to the Product
dimension. You are ready to add information from the other product tables
to the Product dimension using an alternate method. You create multiple
sources for the Product logical table source and simultaneously add the
columns to the Product dimension.
Outcome In the Business Model and Mapping layer, the D1_PROD_DI ET_TYPES,
D1_PRODUCT_SUBTYPE, D1_PRODUCT_TYPE, and D1_SUPPLI ERS
physical tables are added to the existing logical table source for the
Products logical table.
In the Business Model and Mapping layer, the DI ET_TYPE, I TEMSUBTYPE,
I TEMTYPE, and I TEMSUPPLI ER logical columns are added to the Products
logical table and mapped to the appropriate physical tables.
Time 510 minutes
Instructions
1. In this step, you use a second method to add additional information to the Product
dimension and simultaneously add a new source to the existing D1_PRODUCTS
logical table source.
a. In the Physical layer, expand the D1_PROD_DIET_TYPES table and select
the DIET_TYPE column.
b. In the Physical layer, drag the DIET_TYPE column onto the D1_PRODUCTS
logical table source in the Products dimension in the Business Model and
Mapping layer.
c. Ensure that the DIET_TYPE column is added to the Products logical table.
d. Double-click the D1_PRODUCTS logical table source to view its properties.
e. Click the Column Mapping tab.
f. To which physical column and physical table is the DIET_TYPE logical
column mapped?



RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

g. Click OK to close the Logical Table Source properties dialog box.
RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

2. Repeat the steps above to add more product information to the Products
dimension, simultaneously adding new sources to the existing D1_PRODUCTS
logical table source.
a. Drag the following columns from the Physical layer to the D1_PRODUCTS
logical table source:
Physical Table Physical Column
D1_PRODUCT_SUBTYPE ITEMSUBTYPE
D1_PRODUCT_TYPE ITEMTYPE
D1_SUPPLIERS ITEMSUPPLIER
b. Open the D1_PRODUCTS logical table source properties dialog box and click
the Column Mapping tab to check your results.
c. Which new table sources are added to the D1_PRODUCTS logical table
source? It may be necessary to scroll to the right.






d. Click OK to close the Logical Table Source properties dialog box.
3. Rename the new logical columns in the Product dimension so they are meaningful
to users.
a. In the Business Model and Mapping layer, slowly double-click the
DIET_TYPE logical column to make the column editable or right-click the
column and select Rename.
b. Change the name to Diet Type.
c. Rename the other new columns to the following:
From To
ITEMSUBTYPE Subtype
ITEMTYPE Type
ITEMSUPPLIER Supplier
4. Add the new product information to the SupplierSales presentation catalog.
a. Drag the five new columns from the Business Model and Mapping layer onto
the Products table in the SupplierSales presentation catalog and reorder the
columns in the Presentation layer as follows:
Column Name
Price
Type
Subtype
RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

Diet Type
Supplier
5. Select File > Check Global Consistency to validate your work. If you receive
any error messages, fix them before proceeding.
6. Close the Consistency Check Manager.
7. Save and close the repository.
8. Close the Administration Tool.
9. Start the Oracle BI Server service.
10. Start Answers.
a. Select Start > Programs > Oracle Business Intelligence > Presentation
Services.
b. Log in as Administrator. There is no need to enter a password.
c. Click the Answers link.
11. Create a request to check your work.
a. Select the SupplierSales subject area.
b. Create the following request:

RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

c. Click the Results tab to view the results.

12. Examine the query log to determine which table or tables have been accessed for
this simple query.
a. Select Settings > Administration > Manage Sessions.
b. Click View Log for the last entry in the Cursor Cache section.
c. Ensure that three tables: D1_PRODUCTS, D1_PRODUCT_SUBTYPE, and
D1_PRODUCT_TYPE, have all been accessed, despite the fact that the
D1_PRODUCT_TYPE table alone contains all the data requested. The log
RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

should look similar to the following screenshot:

d. Why are all the three tables included in the query?



e. Close the query log. In the next practice, you specify a more economical way
for Oracle BI Server to access this data.
13. Log out of Oracle BI.
RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

Solutions 6-3: Creating Multiple Sources for a
Logical Table Source (Automated)
Answers
1.f. To which physical column and physical table is the DIET_TYPE logical
column mapped?
D1_PROD_DIET_TYPES.DIET_TYPE
2.c. Which new table sources are added to the D1_PRODUCTS logical table
source? It may be necessary to scroll to the right.
D1_PRODUCT_SUBTYPE, D1_PRODUCT_TYPE, and D1_SUPPLIERS

12.c. Why are all three tables included in the query?
Because of the join conditions. The only way the query can access the
D1_PRODUCT_TYPE table is through the D1_PRODUCTS table.
RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

Practice 6-4: Adding a New Logical Table
Source
Goal To add a second logical table source to the Product dimension
Scenario Examining the physical sources and the Pr oduct s dimension table, you
discover that the Type Code and Type columns are mapped to different
physical tables, while the information for both is stored in a common
physical table.
In order to model the most economical method for Oracle BI Server to find
information for these two columns, you decide to add a second logical table
source to the Product dimension so that Oracle BI Server queries only one
table for the Type Code and Type information.
Outcome In the Business Model and Mapping layer, Type is added as second logical
table source for the Products logical table.
Time 5 minutes
Instructions
1. Open the ABC repository file in offline mode.
a. Stop the Oracle BI Server service.
b. Navigate to D:\OracleBI\server\Repository.
c. Double-click ABC.rpd.
d. Log in as Administrator with no password.
2. Examine the existing column mappings for the two columns, Type and Type
Code, to determine the most economical method for Oracle BI Server to find
information.
a. In the Business Model and Mapping layer, expand the Sources folder of the
Products table and double-click D1_PRODUCTS.
b. Click the Column Mapping tab.
c. To what physical table and physical column is Type Code mapped?



d. To what physical table and physical column is Type mapped?

RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182



e. Click Cancel to close the Properties window.


3. Determine which physical table stores information for both Type Code and
Type.
a. In the Physical layer, expand the D1_PRODUCT_TYPE physical table.
b. Ensure that this table stores the information for ITEMTYPE and TYPECODE.
4. Model a new mapping for the Type Code logical column by creating a second
logical table source for the Products dimension.
a. In the Business Model and Mapping layer, right-click the Products table and
select New Object > Logical Table Source.
b. Ensure that the General tab is selected.
c. In the Name field, enter Type to name the new logical table source.
d. Click Add.
e. In the Browse dialog box, double-click the D1_PRODUCT_TYPE physical
table to select it.
f. Click OK to close the Logical Table Source properties dialog box. Note that
the new logical table source, Type, is added to the Sources folder.

g. Double-click the Type logical table source to view its properties.
h. Click the Column Mapping tab.
i. Use the Expression Builder to map the Type Code logical column to the
D1_PRODUCT_TYPE. TYPECODE physical column. This maps the Type
Code logical column to the TYPECODE physical column in the
RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

D1_PRODUCT_TYPE physical table for this logical table source.

j. Click OK to close the Expression Builder.
k. Use the Expression Builder to map the Type logical column to the
D1_PRODUCT_TYPE. I TEMTYPE physical column. This maps the Type
logical column to the I TEMTYPE physical column in the
D1_PRODUCT_TYPE physical table for this logical table source.

l. Click OK to close the Expression Builder.
RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

m. Check your work:

n. Click OK to close the Logical Table Source properties dialog box. There are
now two logical table sources for the Products dimension and the Type Code
logical column maps to both the D1_PRODUCT_TYPE and D1_PRODUCTS
tables. In a later practice, you let Oracle BI Server know which source to use
by specifying the aggregation content for the Type logical table source.
o. Select File > Check Global Consistency to validate your work. If you receive
any error messages, fix the errors before proceeding.
p. If the repository is consistent, save and close the repository.
q. Select File > Exit to close the Administration Tool.
Solutions 6-4: Adding a New Logical Table
Source
Answers
2.c. To what physical table and physical column is Type Code mapped?
Type Code is mapped to the D1_PRODUCTS physical table and to the
TYPECODE physical column.
2.d. To what physical table and physical column is Type mapped?
Type is mapped to the D1_PRODUCT_TYPE physical table and to the
ITEMTYPE physical column.
RR I-TEC,,#209,Ni lagiri Block, Adithya Enclave @8801408841, 8790998182

Das könnte Ihnen auch gefallen