Skip Headers
Oracle® Business Intelligence Standard Edition One Tutorial
Release 10g (10.1.3.2.1)
E10312-01
  Go To Documentation Library
Library
Go To Product List
Product
Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

3 Set Up the Data Mart

In this chapter, you use Oracle Warehouse Builder (OWB) to create the logical and physical design of the data mart.

Prerequisites: There are no prerequisites for this chapter.

This chapter contains the following topics:

3.1 About Setting Up the Data Mart

To set up the data mart, you use OWB components to:

  1. Create the logical design for the data mart star schema.

  2. Map the logical design to a physical design.

  3. Generate code to create the objects for the data mart.

  4. Create a process flow for populating the data mart.

  5. Execute the process flow to populate the data mart.

In addition to a powerful graphical interface, OWB provides a metadata repository that holds detailed design information about your databases. The repository is implemented as a set of tables in an Oracle Database. The data you enter in the repository is available to any user who has at least read access to the repository application system.

To access the OWB repository, you use an OWB component called Design Center, the main OWB client in which you design sources, targets, ETL mapping and transformations. Using the OWB Design Center, you import data source definitions, define target structures, validate the structures, generate and deploy the code to implement the structures, and execute the process flows to run the ETL mappings that load data into the target structures. Once deployed, Warehouse Builder assists in the daily maintenance as well as monitoring of the deployed system.

3.2 Examining a Completed Warehouse Builder Project

Let us begin by taking a tour of the completed data warehouse project called GEC_DW (Global Electronics Corporation Data Warehouse). This is a data warehouse using a star schema, with one cube (SALES) and five dimensions (CHANNELS, GEOGRAPHY, PRODUCTS, PROMOTIONS, and TIME).

This section contains the following topics:

3.2.1 Access the OWB Repository Using the OWB Design Center

To access the OWB repository using the OWB Design Center, follow these steps:

  1. From the Windows Start menu, select Programs > Oracle - BISE1Home1_WarehouseBuilder > Warehouse Builder > Design Center to invoke Warehouse Builder. The Design Center Logon window takes a few seconds to appear.

  2. Before logging on with the username and password, you must establish connect information. Click Show Details.

  3. The Design Center Logon window expands. Provide the host name, port number, and service name that were defined during installation:

    • Host: localhost

    • Port: 1521

    • Service Name: bise1db

  4. In the top portion of the Design Center Logon window, enter the OWB repository user name and password.

    • User Name: owbrepos_user

    • Password: welcome1 (or, use whatever password you specified during BISE1 installation)

  5. Click OK in the Design Center Logon window. The Design Center appears.

Figure 3-1 OWB Design Center

Image description currently unavailable.

3.2.2 Explore the Completed OWB Project

The Design Center is divided into three windows: Project Explorer, Connection Explorer, and Global Explorer. In Project Explorer, you see two projects, GEC_DW (Global Electronics Corporation Data Warehouse), the completed project for your use as a reference, and GEC_DW_TUTORIAL, the project you will be modifying as you work through the guided steps in this tutorial.

To explore the completed OWB project:

  1. Select and expand the GEC_DW project.

  2. A project is a container to manage your design work. Warehouse Builder contains wizards, object editors, property sheets, and object finding tools that assist you in designing your business intelligence system. Under the GEC_DW project, various object types appear in the tree: Databases, Files, Applications, Data Profiles, and so on.

    Figure 3-2 GEC_DW Project

    Image description currently unavailable.

    In this tutorial, you will be working with the Databases, Files, and Process Flows object types.

  3. Expand the Databases node. You can see various object types that can participate in your design: Oracle, Non-Oracle, and Transportable Modules.

    Figure 3-3 Databases Node of GEC_DW Project

    Image description currently unavailable.
  4. Expand the Oracle node. You can see two modules defined in the GEC_DW project: BISE1_SALESWH and BISE1_SALES. Modules are logical groupings of source or target definitions. Source modules hold metadata describing source systems from which you extract data. Target modules hold metadata describing your target data warehouse or data marts. Every target module must be mapped to a target user schema. Make sure that the target module references this target schema by assigning an appropriate location.

    Figure 3-4 Databases > Oracle Node of the GEC_DW Project

    Image description currently unavailable.
  5. The BISE1_SALES module is the source module. Expand the BISE1_SALES module, then expand the Tables node. These are the operational data table definitions used to construct the target data warehouse object definitions stored in the BISE1_SALESWH module.

    Figure 3-5 BISE1_SALES > Tables Node of the GEC_DW Project

    Image description currently unavailable.
  6. The BISE1_SALESWH module is the target module. Expand the BISE1_SALESWH module, then expand the Mappings, Dimensions, Cubes, Tables, and Sequences nodes. These are the object definitions used to create and populate the data warehouse.

    Figure 3-6 BISE1_SALESWH > Mappings Node of the GEC_DW Project

    Image description currently unavailable.
  7. View the property settings for the BISE1_SALESWH module by right-clicking the module, then selecting Properties from the pop-up menu. Notice that objects have both a Business Name and a Physical Name, which can be different. Usually, you should synchronize them. Close the Properties window.

    Figure 3-7 BISE1_SALESWH Properties

    Image description currently unavailable.
  8. Double-click the BISE1_SALESWH module to invoke its Editor window. Almost all objects have both a Properties window, and an Editor window. You can set the object definitions and configurations using the Editor window. Close the Editor window.

    Figure 3-8 BISE1_SALESWH Editor Window

    Image description currently unavailable.

Now that you have examined a completed data warehouse project, you are ready to complete your own data warehouse project called GEC_DW_TUTORIAL. The GEC_DW_TUTORIAL project will build the same data warehouse as the GEC_DW project. The only difference between these two projects is the data warehouse target. While the GEC_DW project is deployed to the BISE1_SALESWH target, you will deploy the GEC_DW_TUTORIAL project to the BISE1_TUTORIALWH target.

3.3 Creating the Dimensions and the Cube

In Warehouse Builder, you can define dimensions and cubes using a wizard or an editor. Use the wizard to create dimensional and cube objects easily. The wizard creates a fully functional dimensional or cube object, including the implementation objects that store the dimensional or cube object data but with predefined defaults for certain features. Alternatively, you can use the editor to create or edit dimensional or cube objects. Use editors instead of wizards when you want to specify settings different from the default settings of the wizards, or to access additional settings not provided in the wizards.

This section contains the following topics:

3.3.1 Create the CHANNELS Dimension Using the Wizard

To create the CHANNELS dimension using the wizard:

  1. In the Design Center Project Explorer, expand GEC_DW_TUTORIAL > Databases > Oracle > BISE1_TUTORIALWH.

  2. Right-click Dimensions, then select New > Using Wizard. The Create Dimension Wizard launches. Click Next on the Welcome page.

  3. On the Name and Description page, enter the following:

    • Name: CHANNELS

    • Description: Channels Dimension

  4. Click Next.

  5. On the Storage Type page, choose ROLAP: Relational storage and click Next.


    Note:

    The ROLAP storage type is best if you have high volumes of data combined with high refresh rates, or if you have detailed high-volume data. When you store data in a relational form, OWB by default uses the star schema implementation method.

  6. On the Dimension Attributes page, you will find three predefined columns: ID, NAME, and DESCRIPTION.

  7. Delete the DESCRIPTION column. To do this, right-click the number 3, in the column to the left of DESCRIPTION, and select Delete, as shown in Figure 3-9.

    Figure 3-9 Dimension Attributes Page: Deleting the Description Column

    Image description currently unavailable.
  8. For the Name attribute, select empty value from the Identifier drop-down list, and change Length to 60.

    Figure 3-10 Dimension Attributes Page: Changing the Length to 60

    Image description currently unavailable.
  9. Add a new attribute, SOURCE_ID (Business, Varchar2, 40), as shown in Figure 3-11, and click Next.

    Figure 3-11 Dimension Attributes Page: Adding the SOURCE_ID Attribute

    Image description currently unavailable.
  10. On the Levels page, you create the three levels as shown in Figure 3-12.

    Figure 3-12 Levels Page

    Image description currently unavailable.
  11. Click Next.

  12. On the Level Attributes page, specify the attributes for each level, as follows:

    • For the TOTAL level, select attributes as shown in Figure 3-13.

      Figure 3-13 Attributes for TOTAL Level

      Image description currently unavailable.
    • For the CLASS level, select attributes as shown in Figure 3-14.

      Figure 3-14 Attributes for CLASS Level

      Image description currently unavailable.
    • For the CHANNEL level, select attributes as shown in Figure 3-15.

      Figure 3-15 Attributes for CHANNEL Level

      Image description currently unavailable.

      Note:

      For the lowest level, all the attributes are selected by default.

  13. Click Next.

  14. On the Data Policy page, accept the default choice of Type 1: Do not keep history, then click Next.


    Note:

    A slowly changing dimension (SCD) is a dimension that stores and manages both current and historical data over time in a data warehouse. Examples of SCDs include product package sizes, package types, prices, and country names. If you need to track the evolutionary history of the data values, you can choose Type 2 or 3, which require a separate license of the Oracle Warehouse Builder Enterprise ETL Option.

    Figure 3-16 Data Policy Page

    Image description currently unavailable.
  15. Examine the Pre Create Settings page and click Next.

  16. The Dimension Creation Progress implements the dimension, and the dimension is successfully created. Click Next.

    Figure 3-17 Dimension Creation Progress

    Image description currently unavailable.
  17. The Summary page lists the dimension definition. Notice a database table and sequence will be created as well. Click Finish.

    Figure 3-18 Summary Page

    Image description currently unavailable.
  18. Save your work by clicking the Save All icon on the Design Center toolbar.

    Figure 3-19 Save All Icon

    Image description currently unavailable.
  19. Click Yes in the Warehouse Builder Warning dialog box.


    Note:

    The warning dialog box appears every time you click Save All.

3.3.2 Create the PRODUCTS Dimension Using the Editor

To create the PRODUCTS dimension using the editor:

  1. In the Design Center Project Explorer, expand GEC_DW_TUTORIAL > Databases > Oracle > BISE1_TUTORIALWH, if it is not already expanded.

  2. Right-click Dimensions, then select New > Using Editor. The Data Object Editor launches.

  3. In the Dimension Details window, ensure that the Name tab is selected. In the Name field, change DIMENSION_1 to PRODUCTS. In the Description field, enter Product dimension.

    Figure 3-20 Dimension Details: Name Tab

    Image description currently unavailable.
  4. Click the Storage tab. Accept the default option of ROLAP: Relational storage. For Implementation, choose Star.

    Figure 3-21 Dimension Details: Storage Tab

    Image description currently unavailable.
  5. Click the Attributes tab. Click Select. In the Available Sequence dialog box, expand BISE1_TUTORIALWH and select PROD_DIM_SEQ. Click OK.

    Figure 3-22 Available Sequences Dialog Box

    Image description currently unavailable.
  6. The sequence will populate the Dimension Key. Enter attribute information as shown in Figure 3-23.

    Figure 3-23 Dimension Details: Attributes Tab

    Image description currently unavailable.
  7. Click the Levels tab. This tab has two sections: Levels and Level Attributes for level_name.

    1. In the Levels section, enter information as shown in Figure 3-24.

      Figure 3-24 Dimension Details: Levels Section of Levels Tab

      Image description currently unavailable.
    2. In the Level Attributes for each level, specify the following:

      • Set level attributes for TOTAL as shown in Figure 3-25.

        Figure 3-25 Dimension Details: Level Attributes for TOTAL

        Image description currently unavailable.
      • Set level attributes for CATEGORY as shown in Figure 3-26.

        Figure 3-26 Dimension Details: Level Attributes for CATEGORY

        Image description currently unavailable.
      • Set level attributes for SUBCATEGORY as shown in Figure 3-27.

        Figure 3-27 Dimension Details: Level Attributes for SUBCATEGORY

        Image description currently unavailable.
      • Set level attributes for PRODUCT as shown in Figure 3-28.

        Figure 3-28 Dimension Details: Level Attributes for PRODUCT

        Image description currently unavailable.
  8. Click the Hierarchies tab. Select Level values from the drop-down list as shown in Figure 3-29.

    Figure 3-29 Dimension Details: Hierarchies Tab

    Image description currently unavailable.
  9. Click the SCD tab. Note the default selection, Type 1: Do not keep history.

  10. Create the dimension table and bind it to the repository. On the canvas, right-click the PRODUCTS dimension and select Auto Bind. When you perform auto binding, Warehouse Builder automatically maps the measures and dimension references of the cube to the database columns that store their data.

    Figure 3-30 Auto Binding

    Image description currently unavailable.
  11. You have now created the PRODUCTS dimension. Figure 3-31 shows what you will see after you complete the binding process.

    Figure 3-31 PRODUCTS Dimension

    Image description currently unavailable.
  12. Save your work by clicking Save All on the Data Object Editor toolbar.

  13. Close the Data Object Editor.

3.3.3 Create the TIMES Dimension Using the Time Wizard

To create the TIMES dimension using the Time Wizard:

  1. In Project Explorer in the Design Center, expand GEC_DW_TUTORIAL > Databases > Oracle > BISE1_TUTORIALWH. Right-click Dimensions, then select New > Using Time Wizard. The Create Time Dimension Wizard launches. Click Next on the Welcome page.

  2. On the Name and Description page, enter the following:

    • Name: TIMES

    • Description: Times Dimension

  3. Click Next.

  4. On the Storage Type page, accept the default ROLAP: Relational storage and click Next. The Data Generation page appears.

  5. Enter the following information:

    • Start year: 2003

    • Number of years: 4

    • Ensure that the Calendar option is selected.


      Note:

      On the Data Generation page, you specify the range of time data that is required for your warehouse. This information will be used to generate a mapping that will populate the time dimension. Within this mapping, the dates you enter are added as parameters, allowing you to rerun this mapping with dates at a later stage.

      Figure 3-32 Data Generation Page

      Image description currently unavailable.

    Click Next.

  6. On the Levels page, select Normal Hierarchy, and select Calendar Year, Calendar Quarter, and Calendar Month as shown in the Figure 3-33, then click Next.

    Figure 3-33 Levels Page

    Image description currently unavailable.
  7. On the Pre Create Settings page, examine the details and click Next. A Progress bar will show the progress as the wizard creates the objects.

  8. On successful completion, click Next. On the Summary page, examine the details again and click Finish.

  9. In Project Explorer, observe that the wizard has generated four objects necessary for a fully functional TIMES dimension:

    1. Expand GEC_DW_TUTORIAL > Databases > Oracle > BISE1_TUTORIALWH > Dimensions. You can see the TIMES dimension.

    2. Expand GEC_DW_TUTORIAL > Databases > Oracle > BISE1_TUTORIALWH > Sequences. You can see the TIMES_SEQ sequence that populates the surrogate ID of the time dimension levels.

    3. Expand GEC_DW_TUTORIAL > Databases > Oracle > BISE1_TUTORIALWH > Tables. You can see the TIMES table, which supports the relational implementation of the time dimension that will physically store the time data.

    4. Expand GEC_DW_TUTORIAL > Databases > Oracle > BISE1_TUTORIALWH > Mappings. You can see the TIMES_MAP mapping, which populates the time dimension.

      Figure 3-34 Project Explorer: TIMES Dimension, TIMES_SEQ, TIMES Table, and TIMES_MAP

      Image description currently unavailable.
  10. Click Save All to save your work.

3.3.4 Create the SALES Cube Using the Editor

To create the SALES cube using the editor:

  1. From the Project Explorer in the Design Center, expand GEC_DW_TUTORIAL > Databases > Oracle > BISE1_TUTORIALWH. Right-click Cubes, then select New > Using Editor. The Data Object Editor window is displayed.

  2. In the Cube Details window, ensure that the Name tab is selected. In the Name field, change CUBE_1 to SALES. In the Description field, enter Sales Cube.

    Figure 3-35 Cube Details: Name Tab

    Image description currently unavailable.
  3. Click the Storage tab. Choose settings as follows:

    • Accept the default selection, ROLAP: Relational data structures. Using this option, the cube definition and its data are stored in the relational form in the database.

    • Deselect Create bitmap indexes.


      Note:

      Bitmap indexes can enhance performance. To make use of bitmap indexes, a separate license for Oracle Database Enterprise Edition is required.

    Figure 3-36 Cube Details: Storage Tab

    Image description currently unavailable.
  4. Click the Dimensions tab. Select the dimension from the drop-down list in the dimension column and the corresponding levels in the Level column, as shown in Figure 3-37.

    Figure 3-37 Cube Details: Dimensions Tab

    Image description currently unavailable.
  5. Click the Measures tab and enter the information as shown in Figure 3-38.

    Figure 3-38 Cube Details: Measures Tab

    Image description currently unavailable.
  6. Click the Aggregation tab. The default Aggregation function SUM is already selected for all the dimensions. This is used to aggregate the cube data, and you can accept this default setting. As an example, Figure 3-39 shows that the Cube Aggregation Method is SUM for the GEOGRAPHY dimension.

    Figure 3-39 Cube Details: Aggregation Tab

    Image description currently unavailable.

    After defining the cube structure, you will now specify the details of the database tables or views that store the cube data.

  7. On the canvas, in the Data Object Editor, right-click the SALES cube and select Auto Bind. When you perform auto binding, Warehouse Builder automatically maps the measures and dimension references of the cube to the database columns that store their data.

    Figure 3-40 shows what you will see on the canvas after selecting Auto Bind.

    Figure 3-40 Sales Cube

    Image description currently unavailable.
  8. Save your work and close the Data Object Editor.

3.4 Creating the Mappings

In this section, you will perform the following tasks:

This section contains the following topics:

3.4.1 Design the Mapping to Load the PRODUCTS Dimension

To design the mapping to load the PRODUCTS dimension:

  1. From the Project Explorer in the Design Center, expand GEC_DW_TUTORIAL> Databases > Oracle > BISE1_TUTORIALWH. Right-click the Mappings node and select New. The Create Mapping window is displayed.

  2. In the Create Mapping window, enter LOAD_PRODUCTS as the name of the mapping. Click OK. The Mapping Editor appears.

  3. In the Explorer panel, ensure that the Available Objects tab is selected. Expand Databases > Oracle > BISE1_SALES > Tables. Drag the CATEGORIES and the PRODUCTS tables to the canvas.


    Note:

    If you dragged both tables simultaneously to the canvas, you may initially see only one table displayed in the Mapping canvas. The second table is likely hidden behind the table you see. To see the second table, click and drag the visible table slightly to the top.

    Figure 3-41 Mapping Editor: CATEGORIES and PRODUCTS

    Image description currently unavailable.
  4. On the canvas, double-click the header area of the PRODUCTS table.

  5. In the Table Editor, ensure the Name tab is selected. In the Name field, change PRODUCTS to PRODUCTS_IN. Click OK.

  6. From the Explorer panel, collapse the BISE1_SALES module and expand BISE1_TUTORIALWH > Dimension.

  7. Drag the PRODUCTS dimension to the canvas.

    Figure 3-42 Mapping Editor: PRODUCTS

    Image description currently unavailable.
  8. Double-click the header area of the PRODUCTS dimension. In the Table Editor, in the Name field, change PRODUCTS to PRODUCTS_OUT and click OK.

  9. Add the CONSTANT and FILTER operators to the canvas. From the Palette, drag the Constant operator to the canvas. You need two filters, so drag the Filter operator to the canvas twice.

    Figure 3-43 Mapping Editor: Constant and Filter

    Image description currently unavailable.
  10. Click the Auto Layout icon on the Mapping Editor toolbar to arrange the objects on the canvas.

    Figure 3-44 Mapping Editor Toolbar: Auto Layout Icon

    Image description currently unavailable.
  11. Your canvas now appears as shown in Figure 3-45.

    Figure 3-45 Canvas After Choosing Auto Layout

    Image description currently unavailable.
  12. Double-click the CONSTANT operator's header and change its name to TOTALS. Select the Output Attributes tab in the CONSTANT Editor.

    Figure 3-46 CONSTANT Editor: TOTALS

    Image description currently unavailable.
  13. Click the Add button to add the following two attributes:

    • TOT - VARCHAR2(20)

    • SRC_ID – VARCHAR2(20)

    Figure 3-47 CONSTANT Editor: Output Attributes

    Image description currently unavailable.
  14. Click OK to close the CONSTANT Editor window.

  15. On the Canvas, click the TOTALS constant operator and select the TOT attribute. In the Property Inspector window on the left, click the field next to Expression and enter 'Product Total'.

    Figure 3-48 TOT Attribute

    Image description currently unavailable.
  16. On the Canvas, with the TOTALS constant operator selected, click the SRC_ID attribute. In the Property Inspector window, click the field next to Expression and enter '99999'.

    Figure 3-49 SRC_ID Attribute

    Image description currently unavailable.
  17. Double-click the FILTER operator header on the canvas. Change the name FILTER to CATS. Click OK to close the Filter Editor.

  18. Maximize the CATEGORIES operator so that all the attributes are clearly visible.

  19. Add a connection line from attributes in operator CATEGORIES.INOUTGRP1 to INOUTGRP1 of operator CATS, as shown in Table 3-1.

    Table 3-1 CATEGORIES.INOUTGRP1 to CATS Mapping

    CATEGORIES.INOUTGRP1 CATS

    ID

    INOUTGRP1

    NAME

    INOUTGRP1

    DESCRIPTION

    INOUTGRP1

    CATEGORY_ID

    INOUTGRP1


    To draw the connection line, click the right arrow for each CATEGORIES attribute, hold down the mouse button, and drag the line to the left arrow of CATS.INOUTGRP1.

    Figure 3-50 Connecting CATEGORIES.INOUTGRP1 to CATS

    Image description currently unavailable.

    Figure 3-51 shows what you should see when you are done adding the connections.

    Figure 3-51 Completed Connections Between CATEGORIES.INOUTGRP1 and CATS

    Image description currently unavailable.
  20. Specify the filter condition for the CATS filter operator as: INOUTGRP1.CATEGORY_ID IS NULL.

    To do this, click the header area of the CATS filter operator on the canvas. On the left-hand side, in the Filter Properties: CATS window, click the field next to Filter Condition. Click the ellipsis (). The Expression Builder for the filter condition is launched. OWB enables you to build the condition, or lets you enter the filter condition.

    Figure 3-52 Specifying the Filter Condition

    Image description currently unavailable.
  21. In the Expression builder on the left-hand side, expand INOUTGRP1. Double-click CATEGORY_ID. You see that INOUTGRP1.CATEGORY_ID is pasted in the Filter condition field on the right-hand side.

    In the lower right area, from the Others drop-down list, select IS NULL and click Paste. You see the expression INOUTGRP1.CATEGORY_ID IS NULL in the Filter Condition for CATS field.

    Figure 3-53 Filter Condition for CATS: Pasting IS NULL

    Image description currently unavailable.
  22. Click Validate. You will see the result in the Validation results field. If the validation is successful, click OK.

    Figure 3-54 Validating the Expression

    Image description currently unavailable.
  23. Change the other FILTER operator to SUBCATS. Double-click the FILTER operator header on the canvas. Change the name FILTER0 to SUBCATS. Click OK to close the Filter Editor.

  24. Maximize the CATEGORIES operator so that all the attributes are clearly visible.

  25. Add a connection line from the attributes in operator CATEGORIES.INOUTGRP1 to INOUTGRP1 of operator SUBCATS as shown in Table 3-2.

    Table 3-2 CATEGORIES.INOUTGRP1 to SUBCATS Mapping

    CATEGORIES.INOUTGRP1 SUBCATS

    ID

    INOUTGRP1

    NAME

    INOUTGRP1

    DESCRIPTION

    INOUTGRP1

    CATEGORY_ID

    INOUTGRP1


    Figure 3-55 shows what you should see when you are done adding the connections.

    Figure 3-55 Completed Connections Between CATEGORIES.INOUTGRP1 and SUBCATS

    Image description currently unavailable.
  26. Specify the filter condition for the SUBCATS filter operator as INOUTGRP1.CATEGORY_ID IS NOT NULL.

    To do this, click the header area of the SUBCATS filter operator on the canvas. On the left-hand side, in the Filter Properties: SUBCATS window, click the field next to Filter Condition. Click the ellipsis (). The Expression Builder for the filter condition is launched.

  27. In the Expression builder on the left-hand side, expand INOUTGRP1. Double-click CATEGORY_ID. You see that INOUTGRP1.CATEGORY_ID is pasted in the Filter condition field on the right-hand side.

    In the lower right area, from the Others drop-down list, select IS NOT NULL and click Paste. You see the expression INOUTGRP1.CATEGORY_ID IS NOT NULL in the Filter Condition for SUBCATS field.

  28. Click Validate. You will see the result in the Validation results field. If the validation is successful, click OK.

    Figure 3-56 Filter Condition for SUBCATS

    Image description currently unavailable.
  29. Draw connection lines from the attributes in OUTGRP1 of TOTALS constant operator to attributes in groups in the PRODUCTS_OUT dimension operator, as shown in Table 3-3.

    Table 3-3 TOTALS.OUTGRP1 to PRODUCTS_OUT Mapping

    TOTALS.OUTGRP1 PRODUCTS_OUT

    TOT

    TOTAL.NAME

    TOT

    TOTAL.DESCRIPTION

    SRC_ID

    TOTAL.SOURCE_ID

    SRC_ID

    CATEGORY.TOTAL_SOURCE_ID


    Figure 3-57 shows what you should see when you are done adding the connections.

    Figure 3-57 Completed Connections Between TOTALS.OUTGRP1 and PRODUCTS_OUT

    Image description currently unavailable.
  30. Draw connection lines from the attributes in INOUTGRP1 of CATS filter operator to attributes in the CATEGORY group of dimension operator PRODUCTS_OUT, as shown in Table 3-4.

    Table 3-4 CATS.INOUTGRP1 to PRODUCTS_OUT Mapping

    CATS.INOUTGRP1 PRODUCTS_OUT

    ID

    CATEGORY.SOURCE_ID

    NAME

    CATEGORY.NAME

    DESCRIPTION

    CATEGORY.DESCRIPTION


    Figure 3-58 shows what you should see when you are done adding the connections.

    Figure 3-58 Completed Connections Between CATS.INOUTGRP1 and PRODUCTS_OUT

    Image description currently unavailable.
  31. Draw connection lines from the attributes in INOUTGRP1 of SUBCATS filter operator to attributes in the SUBCATEGORY group of dimension operator PRODUCTS_OUT, as shown in Table 3-5.

    Table 3-5 SUBCATS.INOUTGRP1 to PRODUCTS_OUT Mapping

    SUBCATS.INOUTGRP1 PRODUCTS_OUT

    CATEGORY_ID

    SUBCATEGORY.CATEGORY_SOURCE_ID

    ID

    SUBCATEGORY.SOURCE_ID

    NAME

    SUBCATEGORY.NAME

    DESCRIPTION

    SUBCATEGORY.DESCRIPTION


    Figure 3-59 shows what you should see when you are done adding the connections.

    Figure 3-59 Completed Connections Between SUBCATS.INOUTGRP1 and PRODUCTS_OUT

    Image description currently unavailable.
  32. Draw connection lines from the attributes in INOUTGRP1 of table operator PRODUCTS_IN to attributes in the PRODUCT group of dimension operator PRODUCTS_OUT, as shown in Table 3-6.

    Table 3-6 PRODUCTS_IN.OUTGRP1 to PRODUCTS_OUT Mapping

    PRODUCTS_IN.OUTGRP1 PRODUCTS_OUT

    SUBCATEGORY_REFERENCE

    PRODUCT.SUBCATEGORY_SOURCE_ID

    IDENTIFIER

    PRODUCT.SOURCE_ID

    NAME

    PRODUCT.NAME

    DESCRIPTION

    PRODUCT.DESCRIPTION

    PACK_SIZE

    PRODUCT.PACK_SIZE

    LIST_PRICE

    PRODUCT.LIST_PRICE


    Figure 3-60 shows what you should see when you are done adding the connections.

    Figure 3-60 Completed Connections Between PRODUCTS_IN.OUTGRP1 and PRODUCTS_OUT

    Image description currently unavailable.

    Note:

    You can collapse objects on the canvas by clicking the Minimize icon: The Minimize icon is an arrow pointing to the lower left.

  33. Validate the LOAD_PRODUCTS mapping by selecting Mapping > Validate from the menu.

    Figure 3-61 Validating the LOAD_PRODUCTS Mapping

    Image description currently unavailable.
  34. The Generation Results panel appears. The warnings on implicit datatype conversion can be ignored. The Oracle Database will perform automatic datatype conversion.

    Figure 3-62 Generation Results Panel

    Image description currently unavailable.
  35. Select Generate from the Mapping menu. This will generate the code required to implement the design. Ignore the warnings (7 warnings). Close the Generation Results window.

  36. Save your work and close the Mapping Editor.

3.4.2 Use Tcl Scripts to Create Mappings for the CHANNELS Dimension and the SALES Cube

Tcl (Tool Command Language) is a scripting language that can automate and simplify tasks. Oracle Warehouse Builder includes a rich Tcl interface called OMB*Plus. OMB*Plus can be invoked from the command line, or from within the OWB Design Center.

To create mappings for the Channels Dimension and the Sales Cube:

  1. In the OWB Design Center, select Window > OMB*Plus from the menu.

  2. In the OMB*Plus panel, at the OMB+> prompt, enter the following:

    OMB+> cd BISE1_installation_location/tutorial/owb/tcl
    OMB+> source allinit.tcl
    

    Note:

    The slash (/) character is specific to the OMB*Plus TCL interpreter and must be typed in as specified.

  3. Enter the password for the OWBREPOS_OWNER and SYS database accounts. Enter the location of the tcl files (it should be BISE1_installation_location/tutorial/owb/tcl). Click OK.

    Figure 3-63 Connection Info Dialog Box

    Image description currently unavailable.
  4. At the OMB+> prompt, enter the following:

    OMB+> source loadmaps.tcl
    
  5. Using the Project Explorer, verify that the LOAD_SALES and LOAD_CHANNELS objects have been created.

    Figure 3-64 Project Explorer: LOAD_CHANNELS and LOAD_SALES

    Image description currently unavailable.
  6. Save your work. Now, you have all the mappings needed to complete the design of the warehouse. In the next section, you will use the Generate option to generate the code to implement the design.

3.5 Generating the Mappings

You have already designed and generated the LOAD_PRODUCTS mappings. Now, you need to generate mappings for the other dimensions, as well as the SALES cube.

To generate mappings for the other dimensions and SALES cube:

  1. In the Design Center, expand BISE1_SALESWH > Mappings.

  2. Right-click the LOAD_CHANNELS mapping and select Generate.

    Figure 3-65 LOAD_CHANNELS Mapping: Generate

    Image description currently unavailable.
  3. The Generation Results window displays the results. Ignore the warnings. There should not be any errors. Close the Generation Results window.

    Figure 3-66 Generation Results Window

    Image description currently unavailable.
  4. Repeat Steps 2 and 3 for each of the remaining mappings. You can ignore the warnings:

    • LOAD_PROMOTIONS returns 3 warnings

    • LOAD_GEOGRAPHY returns 9 warnings

    • LOAD_SALES returns 5 warnings

    • TIMES_MAP returns no warnings

3.6 Designing a Process Flow

Depending on the business intelligence needs, you can specify how you want to deploy your design. You can run individual mappings to populate target tables. However, you will more likely want to control dependencies and sequencing among multiple mappings by organizing multiple interdependent mappings within a process flow. When working with process flows, you will use an Oracle Workflow location. An Oracle Workflow location has been pre-defined for the purposes of this tutorial.

This section contains the following topics:

3.6.1 Create a New Process Flow

To create a new process flow:

  1. In the Design Center, from the Connection Explorer panel, expand Locations > Process Flows and Schedules > Oracle Workflow.

  2. Double-click OWF_MGR_LOCATION. Enter the password for OWF_MGR (specified during installation). Click Test Connection. If successful, click OK.

  3. In the Design Center, from the Project Explorer, expand GEC_DW_TUTORIAL > Process Flows. Right-click Process Flow Modules and select New. The Create Module Wizard is launched. Click Next on the Welcome page.

    Figure 3-67 New Process Flow Module

    Image description currently unavailable.
  4. On the Name and Description page, enter the following information:

    • Name: PF_BISE1_TUTORIALWH

    • Description: Process Flow module for BISE1_TUTORIALWH

    Then, click Next.

  5. On the Connection Information page, select OWF_MGR_LOCATION from the Location drop-down list. Click Next.

    Figure 3-68 Create Module: Connection Information

    Image description currently unavailable.
  6. On the Summary page, review the summary details and click Finish. The Create Process Flow Package dialog box appears.

  7. In the Create Process Flow Package dialog box, enter PK_SALES as the name of the process flow package and click OK. The Create Process Flow dialog box appears.

  8. In the Create Process Flow dialog box, enter LOAD_BISE1_TUTORIALWH as the name of the process flow and click OK. The process flow is created and the Process Editor is launched.

3.6.2 Add a Fork Activity

To add a Fork activity, in the Process Editor, from the Palette, drag a Fork activity to the canvas. Place the FORK activity after the START activity and before the END activity.

Figure 3-69 Adding a Fork Activity

Image description currently unavailable.

3.6.3 Add the Mappings

To add the mappings:

  1. In the Process Editor, from the Window menu, select Explorer (if not already selected). The Explorer panel should be visible.

    Figure 3-70 Selecting the Explorer Panel

    Image description currently unavailable.
  2. In the Explorer panel, click the Available Objects tab. Expand Mappings > BISE1_TUTORIALWH. Drag the following mappings to the canvas:

    • LOAD_CHANNELS

    • LOAD_PROMOTIONS

    • LOAD_GEOGRAPHY

    • LOAD_PRODUCTS

    • TIMES_MAP

    • LOAD_SALES

    Figure 3-71 Selecting the Mappings

    Image description currently unavailable.
  3. Arrange the activities on the process flow canvas such that the following mapping activities appear after the Fork activity and before the END activity, and in the following order, from top to bottom:

    LOAD_GEOGRAPHY, LOAD_CHANNELS, LOAD_PRODUCTS, LOAD_PROMOTIONS, TIMES_MAP

    To move an activity within the canvas, select the activity. Place the cursor in the header area of the activity. The cursor changes to a single-headed arrow. Click in the header area and keep the left mouse button clicked and drag to the desired location.

    Figure 3-72 Moving an Activity

    Image description currently unavailable.

    Figure 3-73 shows the order of the activities.

    Figure 3-73 Order of Activities

    Image description currently unavailable.

3.6.4 Add an AND and Control Activities

To add an AND and control activities:

  1. From the Palette, drag the AND activity to the canvas. If the Palette is not visible, from the Window menu, select Palette.

  2. On the Process Editor, from the Palette panel, drag the End with Errors and End with Warnings activities to the canvas, and position them as shown in Figure 3-74.

    Figure 3-74 Dragging the End with Errors and End with Warnings Activities

    Image description currently unavailable.

3.6.5 Add Transitions

To add transitions between activities:

  1. Place the cursor (it will change to a single-headed arrow) inside an activity that acts as the source (for example, START). Keeping the left mouse clicked, drag and release the left mouse pointer when you are in the center of the target activity. Create transitions as shown in Table 3-7.

    Table 3-7 Transitions for Activities

    From To

    START

    FORK

    FORK

    LOAD_CHANNELS

    FORK

    LOAD_PROMOTIONS

    FORK

    LOAD_GEOGRAPHY

    FORK

    LOAD_PRODUCTS

    FORK

    TIMES_MAP

    LOAD_CHANNELS

    AND

    LOAD_PROMOTIONS

    AND

    LOAD_CUSTOMERS

    AND

    LOAD_PRODUCTS

    AND

    TIMES_MAP

    AND

    AND

    LOAD_SALES

    LOAD_SALES

    END_SUCCESS

    LOAD_SALES

    END_ERROR

    LOAD_SALES

    END_WARNING


    When you finish adding the transitions, your process flow should look like the one shown in Figure 3-75.

    Figure 3-75 Transitions for Activities

    Image description currently unavailable.
  2. Click the transition line from the LOAD_SALES activity to the END_SUCCESS activity. From the Object Details panel, click Condition. Click the colon (:) button.

    Figure 3-76 Creating a Transition from LOAD_SALES to END_SUCCESS

    Image description currently unavailable.

    In the Transition Condition Editor, select SUCCESS from the Enumerated drop-down list. Click OK.

    Figure 3-77 Transition Condition Editor

    Image description currently unavailable.
  3. Click the transition line from the LOAD_SALES activity to the END_ERROR activity. From the Object Details panel, click Condition. Click the colon (:) button. In the Transition Condition Editor, select ERROR from the Enumerated Conditions drop-down list. Click OK.

  4. Click the transition line from the LOAD_SALES activity to the END_WARNING activity. From the Object Details panel, click Condition. Click the colon (:) button. In the Transition Condition Editor, select WARNING from the Enumerated Conditions drop-down list. Click OK.

    Your error handling process flow should appear as shown in Figure 3-78.

    Figure 3-78 Error Handling Process Flow

    Image description currently unavailable.
  5. Save your work.

3.7 Validating and Generating the Process Flow

To validate and generate the process flow:

  1. In the Process Editor, select Validate from the Process Flow menu. The validation results are displayed in the Compilation Results panel.

    Figure 3-79 Compilation Results Panel

    Image description currently unavailable.
  2. In the Process Editor, select Generate from the Process Flow menu. The script is generated and displayed in the Compilation Results window.

    Figure 3-80 Generated Process Flow

    Image description currently unavailable.
  3. Save your work and close the Process Editor.

3.8 Deploying Mappings and Loading Data

Until now, you have designed and configured the logical definitions of your target system. Now, you learn how to deploy and create the physical instance of your target. You will deploy the relational and dimensional objects. You will then deploy the ETL mappings. Finally, you will deploy and execute the process flow.

Instead of separately deploying the objects, mappings, and process flow, you can also deploy them all in one step. For the purposes of this tutorial, we are deploying them individually so that you can pause after each deployment and view the results.

This section contains the following topics:

3.8.1 Register the Locations

Locations are specific to a type of module, such as the Oracle Database, SAP application, or flat file. In a flat file module, location is the path or the drive and directory in the file system where the flat files reside. In an Oracle Database module, location contains the database connection information.

To register the locations:

  1. In the Design Center, select Control Center Manager from the Tools menu. The Control Center Manager is launched.

  2. In the Control Center, from the navigation tree on the left, right-click BISE1_TUTORIALWH_LOCATION and select Register.

    Figure 3-81 BISE1_TUTORIALWH_LOCATION: Register

    Image description currently unavailable.
  3. The Edit Oracle Database Location dialog box appears. Review the details, enter the password, and click Test Connection. If the connection is successful, click OK.

    Figure 3-82 Edit Oracle Database Location: BISE1_TUTORIALWH_LOCATION

    Image description currently unavailable.
  4. Repeat Steps 2 and 3 for OWF_MGR_LOCATION and BISE1_SALES_LOCATION.

3.8.2 Deploy Sequences

To deploy sequences:

  1. In the Control Center, in the left navigation tree, expand BISE1_TUTORIALWH_LOCATION > BISE1_TUTORIALWH. Select Sequences. On the right, in the Object Details panel, you see the sequences listed. Click the Default Actions button.

    Figure 3-83 BISE1_TUTORIALWH Sequences

    Image description currently unavailable.
  2. Click the Deploy button on the toolbar.

    Figure 3-84 Deploy Button

    Image description currently unavailable.
  3. Monitor the progress in the Control Center Jobs panel. The Deployment tab is selected. In the Control Center Jobs panel, monitor the deployment progress. The deployment progress moves from Generation to Running to Completed Successful.

    Figure 3-85 Control Center Jobs Panel

    Image description currently unavailable.

    Note the value in the Deploy Status column. It displays Success against each object that has been deployed successfully.

3.8.3 Deploy Tables

Deploy the Tables in the BISE1_SALESWH target module. To do this:

  1. In the Control Center, from the navigation tree, expand BISE1_TUTORIALWH_LOCATION > BISE1_TUTORIALWH. Select Tables. In the Object Details panel, the tables are listed. Note the values in the Design Status column, Deploy Action column, and Deploy Status column.

  2. Click Default Actions.


    Note:

    Clicking Default Action changes the value in the Deploy Action column from None to Create.

  3. Click the Deploy button on the toolbar. In the Control Center Jobs panel, monitor the deployment progress. The deployment progress moves from Generate to Run to Successful. Wait until the Deploy Status column displays Success.

3.8.4 Deploy the Mappings

To deploy the mappings:

  1. In the Control Center, from the navigation tree, expand BISE1_TUTORIALWH_LOCATION > BISE1_TUTORIALWH. Select Mappings. In the Object Details panel, the mappings are listed. Note the values in the Design Status column, Deploy Action column, and Deploy Status column.

  2. Click Default Actions.


    Note:

    Clicking Default Action changes the value in the Deploy Action column from None to Create.

  3. Click the Deploy button on the toolbar. In the Control Center Jobs panel, monitor the deployment progress. The deployment progress moves from Generate to Run to Successful. Wait until the Deploy Status column displays Success.

3.8.5 Deploy the Process Flow

Deploy the LOAD_BISE1_TUTORIALWH process flow. Expand OWF_MGR_LOCATION to find the LOAD_BISE1_TUTORIALWH process flow, as follows:

  1. In the Control Center, from the navigation tree, expand OWF_MGR_LOCATION > PF_BISE1_TUTORIALWH. Select PK_SALES. In the Object Details panel, the process flow package is listed.


    Note:

    When you deploy a process flow, all process flows listed in the package are deployed.

  2. Click Default Actions.

  3. Click the Deploy button on the toolbar. In the Control Center Jobs panel, monitor the deployment progress. The deployment progress moves from Generate to Run to Successful. Wait until the Deploy Status column displays Success.

    Figure 3-86 Deploying the LOAD_BISE1_TUTORIALWH Process Flow

    Image description currently unavailable.

3.8.6 Execute the Process Flow

To execute the process flow:

  1. Select the LOAD_BISE1_TUTORIALWH process flow.

  2. To execute a process flow, click the Start button on the toolbar.

    Figure 3-87 Executing a Process Flow

    Image description currently unavailable.

    When you click the Start button, the Control Center Jobs panel in the lower section switches to the Execution tab.

    Figure 3-88 Control Center Jobs Panel: Execution Tab

    Image description currently unavailable.
  3. In the Control Center Jobs panel, the Execution tab is selected. Monitor the execution until it has completed successfully.

    Figure 3-89 Completed Process Flow

    Image description currently unavailable.

    Note:

    The executions are performed asynchronously, which means that you can close the Control Center and OWB client while the Process Flow or Mapping are being executed.

  4. In the Control Center Jobs panel, ensure that the Execution tab is selected. Double-click LOAD_BISE1_TUTORIALWH from the Job column. The Job Details window is displayed.

    Figure 3-90 Job Details for LOAD_BISE1_TUTORIALWH

    Image description currently unavailable.
  5. Click the Execution Results tab and monitor the Row Activity.


    Note:

    You get a count of how many rows were inserted in respective dimensions and the cube.

    Figure 3-91 Execution Results Tab

    Image description currently unavailable.
  6. Close the Control Center Manager.

3.8.7 View the SALES Cube Data

To check that the SALES cube has been populated, use the OWB Design Center Relational Data Viewer to view the data, as follows:

  1. Select View > Refresh from the Design Center menu.

  2. Expand GEC_DW_TUTORIAL> Databases > Oracle > BISE1_TUTORIALWH > Tables.

  3. Right-click SALES and select Data. The Relational Data Viewer window appears, displaying the data in the SALES cube. When you are done viewing the data, close the Data Viewer window and exit the Design Center.

    Figure 3-92 Relational Data Viewer Window

    Image description currently unavailable.

Congratulations! You have successfully set up your data mart.