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.
- Right-click the Warehouse Sources folder.
- Click Define.
The Define Warehouse Source notebook opens.
- In the Name field, type the business name for the warehouse
source:
Tutorial file source
- In the Administrator field, type your name as the contact for
the warehouse source.
- In the Description field, type a short description of the
data:
File data for the TBC company
- In the Warehouse source type list, select Local
files.
The file that will be used in this exercise was installed on your
workstation along with the tutorial, so the source type is Local files.
- Click the Files tab.
- Right-click in the blank area of the Files list, and click
Define.

The Define Warehouse Source File notebook opens.

- In the File name field, type the following name:
X:\Program Files\sqllib\samples\db2sampl\dwc\demographics.txt
where:
- X is the drive on which you installed the sample. This
entry is the path and file name for the demographics file.
- sqllib is the directory under which you installed DB2 Universal
Database.
On a UNIX(R) system, file names are case-sensitive.
- In the Description field, type a short description of the
file:
Demographics data for sales regions.
- Click the Parameters tab.

- Verify that Character is selected in the File type
list.
- Verify that the comma is selected in the Field delimiter
character field.
As you saw in the lesson Lesson 3, Browsing the source data, the file is comma-delimited.
- Verify that the First row contains column names check box is
cleared.
The file does not contain column names.
- 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.
- Double-click the COL001 column name to change the
column name.
- Type the new name for the column:
STATE
- Repeat step 16 and 17 to rename the rest of the columns.
Rename COL002 as CITY and COL003 as
POPULATION.

- Click OK.
The Define Warehouse Source File notebook closes.
- From the Define Warehouse Source notebook, click the Security
tab.
- Select the Tutorial Warehouse Group to grant your user ID the
ability to create steps that use this warehouse source.
- Click >. The Tutorial Warehouse Group moves to the
Selected warehouse groups list.
- Click OK to save your changes and close the Define Warehouse
Source notebook.