Click Browse beside the CatalogSchema field to select the catalog or schema for Click Next. Click Finish. In the Parent-Child Relationship Table Settings window, click OK. In the Logical Dimension window, click OK. Delete the direct joins from the dimensi

Working with Logical Dimensions 9-19 ■ To start the wizard, continue at step 7.

3. Click the Select Parent-Child Relationship Table button to start the manual

process of defining the parent-child relationship table for the parent-child hierarchy. 4. Select the physical table that acts as the parent-child relationship table for your parent-child hierarchy. The table must already exist in the Physical layer. The parent-child relationship table must have at least four columns that describe how the inter-member relationships are derived in the logical table selected for the hierarchy. See About Parent-Child Relationship Tables for more information. 5. Map the four columns from the physical parent-child relationship table to the fields in the Parent-Child Table Column Details area, as follows: ■ Select the Member Key column ■ Select the Parent Key column ■ Select the Relationship Distance column ■ Select the Leaf Node Identifier column

6. Click OK, then click OK again to finish the manual process of defining the

parent-child relationship table.

7. Click the Create Parent-Child Relationship Table button to start the wizard.

The Generate Parent-Child Relationship Table Wizard generates SQL scripts for creating and populating the parent-child relationship table. At the end of the wizard, the Oracle BI Server stores the scripts into directories chosen during the wizard session. The scripts, when executed, will make the parent-child relationship table available to the metadata repository. The wizard contains the following three main windows: ■ Script Location ■ Parent-Child Relationship Table Details ■ Preview Script 8. In the Generate Parent-Child Relationship Table - Script Location screen, enter the Name for the DDL Script to Generate the Parent-Child Table, and select the Location where the Generate script will be placed.

9. Enter the Name for the DDL Script to Populate the Parent-Child Table, and select

the Location where the Populate script will be placed. 10. Click Next. 11. In the Parent-Child Relationship Table Details screen, enter the Name for the parent-child relationship table.

12. Click Browse beside the CatalogSchema field to select the catalog or schema for

the parent-child relationship table.

13. Click Next.

14. In the Preview Script window, you can view either or both of the scripts.

15. Click Finish.

16. In the Parent-Child Relationship Table Settings window, click OK.

17. In the Logical Dimension window, click OK.

9-20 Metadata Repository Builders Guide for Oracle Business Intelligence Enterprise Edition 18. If you used the Generate Parent-Child Relationship Table Wizard to generate create and load scripts, run the scripts to create and load the parent-child relationship table in your data source. Adding the Parent-Child Relationship Table to the Model After you have created a parent-child relationship table and imported it into the Physical layer either manually or using the Generate Parent-Child Relationship Table Wizard, you must edit Physical layer joins to include the parent-child relationship table. You also need to add the parent-child relationship table to the appropriate logical table source. To add the parent-child relationship table to the model: 1. In the Administration Tool, in the Physical layer of the repository, open the Physical Diagram so that it shows the parent-child relationship table and associated dimension table and fact tables. To do this, right-click the appropriate physical tables and select Physical Diagram Selected Objects Only.

2. Delete the direct joins from the dimension table to each of the fact tables.

3. Create joins from each the fact tables to the dimension table through the

parent-child closure table, as follows:

a. Create a join from the parent-child relationship table to the dimension table

using the ancestor key.

b. Create joins from the fact tables to the parent-child relationship table using the

member key. Figure 9–6 shows joins from a dimension table to fact tables that go through a parent-child relationship table. Figure 9–6 Physical Layer Joins Through a Parent-Child Relationship Table

4. In the Business Model and Mapping layer, double-click the logical table source for

the logical dimension table that is used in your parent-child hierarchy.

5. In the General tab of the Logical Table Source dialog, click the Add button.