Business Intelligence Tutorial

Lesson 6. Defining warehouse sources

In the next few lessons, you will focus on defining the Market dimension table in Tutorial business problem. In this lesson, you will define warehouse sources, which is a logical definition of the tables and files that will provide data to the Market dimension table. The Data Warehouse Center uses the specifications in the warehouse sources to access and select the data. You will define two warehouse sources that correspond to the source data that you viewed in Lesson 3, Browsing the source data:

Tutorial Relational Source
Corresponds to the GEOGRAPHIES source table in the DWCTBC database.

Tutorial File Source
Corresponds to the demographics file, which you will load into the warehouse database in a later lesson.

If you are using source databases that are remote to the warehouse server, you must register the databases on the workstation that contains the warehouse server.


Defining a relational warehouse source

In this exercise, you will define a relational warehouse source called the Tutorial Relational Source. It corresponds to the GEOGRAPHIES relational table that is provided in the DWCTBC database.

To define the Tutorial Relational Source:

  1. Right-click the Warehouse Sources folder.
  2. Click Define.

    The Define Warehouse Source notebook opens.

  3. In the Warehouse source name field, type the business name for the warehouse source:
    Tutorial Relational Source
    

    You will use this name to refer to your warehouse source throughout the Data Warehouse Center.

  4. In the Administrator field, type your name as the contact for the warehouse source.
  5. In the Description field, type a short description of the data:
    Relational tables for the TBC company
    
  6. In the Warehouse source type list, select the version of DB2 Universal Database for your operating system (such as DB2 Universal Database for Windows NT).
    The Define Warehouse Source notebook
  7. Click the Database tab.
  8. In the Database name field, type DWCTBC as the name of the physical database.
  9. In the User ID field, type a user ID that has access to the database.

    Use the user ID that you specified when you created the sample database in Lesson 2, Creating a warehouse database.

  10. In the Password field, type your password as the password for the user ID that will access the database.
  11. In the Verify Password field, type the password again.
    The Database page of the Define Warehouse Source notebook
  12. Click the Tables and views tab.

    Because the tables are in a DB2 Universal Database database, you can import the table definitions from DB2 Universal Database rather than defining them manually.

  13. Expand the Tables folder.

    The Filter window opens.

  14. Click OK.

    The Data Warehouse Center displays a progress window. The import might take a while.

    After the import finishes, the Data Warehouse Center lists the imported objects in the Available tables and views list.

  15. From the Available tables and views list, select the GEOGRAPHIES table.
  16. Click >.

    The GEOGRAPHIES table is moved to the Selected tables and views list.
    Selected Table in the Tables and Views list

  17. Click the Security tab.
  18. Select the Tutorial Warehouse Group (which you created in Defining the warehouse group) to grant your user ID the ability to create steps that use this warehouse source.
  19. Click >.

    The Tutorial Warehouse Group moves to the Selected security groups list.
    Selected Warehouse Group in the Tables and Views list

    Accept the rest of the values in the notebook. For more information about the values, see "Warehouse Source" in the online help.

  20. Click OK to save your changes and close the Define Warehouse Sources notebook.

Defining a file source

In this exercise, you will define a file warehouse source called the Tutorial File Source. It corresponds to the Demographics file that is provided with the Data Warehousing sample. For this tutorial, you will define only one file in the warehouse source, but you can define multiple files in a warehouse source.

To define the Tutorial File Source:

  1. Right-click the Warehouse Sources folder.
  2. Click Define.

    The Warehouse Source notebook opens.

  3. In the Warehouse source name field, type the business name for the warehouse source:
    Tutorial file source
    
  4. In the Administrator field, type your name as the contact for the warehouse source.
  5. In the Description field, type a short description of the data:
    File data for the TBC company
    
  6. In the Warehouse source type list, click Local files.

    The file was installed on your workstation along with the tutorial. Local stands for local file.

  7. Click the Files tab.
  8. Right-click in the blank area of the Files list, and click Define.
    Defining a File from the Files list

    The Define Warehouse Source File notebook opens.
    Figure db2tu009 not displayed.

  9. In the File name field, type the following name:
    X:\Program Files\sqllib\samples\db2sampl\dwc\demographics.txt
    

    where:

    The name of the file must not contain spaces. On a UNIX(R) system, file names are case-sensitive.

  10. In the Description field, type a short description of the file:
    Demographics data for sales regions
    
  11. Click the Parameters tab.
    The Parameters page of the Define Warehouse source File notebook
  12. From the File type list, select Character.
  13. In the Field delimiter character field, click the comma.

    As you saw in the lesson Lesson 3, Browsing the source data, the file is comma-delimited.

  14. Clear the First row contains column names check box.

    The file does not contain column names.

  15. Click the Fields tab.

    The Data Warehouse Center reads the file that you specified on the Warehouse Source File page. It defines columns based on the fields in the file, and displays the column definitions in the Fields list. It displays sample data in the File preview area. Up to 10 rows of sample data are displayed. You can scroll to see all the sample data.

  16. Double-click the COL001 column name to change the column name.
  17. Type the new name for the column:
    STATE
    
  18. Press Enter.
  19. Repeat step 16 through step 18 to rename the rest of the columns. Rename COL002 as CITY and COL003 as POPULATION.


    Figure db2tu036 not displayed.

  20. Click OK.

    The File notebook closes.

  21. From the Warehouse Sources notebook, click the Security tab.
  22. Select the Tutorial Warehouse Group to grant your user ID the ability to create steps that use this warehouse source.
  23. Click >. The Tutorial Warehouse Group moves to the Selected security groups list.
  24. Click OK to save your changes and close the Warehouse Sources notebook.

What you just did

In this lesson, you defined a relational warehouse source and a file warehouse source. You will use these sources in Lesson 8, Defining data transformation and movement to indicate that these sources provide data to the LOOKUP_MARKET dimension table for the star schema that you are defining for the TBC Company.


[ Top of Page | Previous Page | Next Page ]