Вы находитесь на странице: 1из 35

Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Use ProCube Client software to create an OLAP Cube that satisfies the requirements below.
Note: Be sure to have a copy of the Microsoft Access sample database “FoodMart2000” on your
local hard drive before proceeding with this exercise.

I. Create a ProCube database file (.olp) named FoodMart 2000 (this does not represents the
source database but rather the file location for any new Cubes).

1. Click the New Database icon or New Database from the File menu
2. Click the Browse button in the New Database dialog box and define the location for
the new database in the proCube Examples folder (C:\Program
Files\satori\proCube\Examples).
3. Enter the File Name “FoodMart2000” with file type (.olp) and click Save. The
Name and the above path will automatically be filled into the New Database Dialog
box.

4. “Allow Reserved Characters” box should be checked and Replication Server should
be marked as None.

Page 1 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

5. click OK

II. Use the proCube Xchange Component to create your first Cube.

A. Configure an ODBC Data Source and name your cube.

1. From the Data menu first select Xchange, then Create Cube to view the “Create Cube
From Relational Source” dialog box.

Page 2 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

2. Click the Configure.. button to select the FoodMart 2000 database from the Data Source
Name (DSN) list box on the left and clicking OK (If you Do Not see FoodMart 2000
listed perform step 3 otherwise proceed to step 4).

3. Select Microsoft Access Driver in the ODBC Driver Drop Down List box. If your PC
does not currently have FoodMart 2000 listed as a System DSN for an ODBC Data
Source then you can configure it by selecting the Add… button to proceed to the “Select
Database” dialog box. Next click the Select… button under Database and find where you
stored the FoodMart 2000 sample database on your local drive. When you see the
FoodMart 2000.mdb database appear in the list box on the left hand side, double click on
the name. You will note that FoodMart2000 now appears in the Database Name field.
Click Ok to close. The file path now appears just above the Select.. button that was
originally pressed however you still have to provide a name for this source database.
Enter FoodMart 2000 in the Data Source Name field and click OK.

Page 3 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

4. Having declared a .mdb driver and Data Source Name, leave User Name and Password
blank and enter the name for your first Cube, “Actual” and leave “Numeric Data Only”
checked (fig. 1). Click OK.

Page 4 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Fig. 1

B. Create Dimensions for your new cube.

1. The first measure in any proCube OLAP cube is a Measures Dimension where Fact
data will be located. Click Add button then Click Next to view all the source tables
found in the FoodMart 2000 sample database (Fig. 2). Double click on the
“Sales_Fact_1998” table to view the table fields and click Next.

2. Select the Members that will make up the Measures Dimension (facts you will
measure in your cube) from the fields in the list box to the left. Select store_sales,
unit_sales and store_costs and drag them to the right side list box. Click Next.

Page 5 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

3. You will next see a summary of the Dimension you just created. Click finish to close.
“Sales_Fact_1998” dimension will now appear in the Dimension dialog box.

Page 6 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 7 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

4. Repeat the above steps by clicking the Add… button to create four more Dimensions
named time_by_day, store, promotion and products from tables of the same name.
(Important: Do Not click the Ok button in this dialog box until all dimensions are
defined. Doing so before completing all dimensions will immediately activate the
synchronization of the cube with the data source and you will be forced to restart
the entire process). In each case, a new step will be added in order to define a join
from the Measures Dimension to each New Dimension in a Define Links dialog box.
Double click on the appropriate table name, for example time_by_day table to add
that table as a new dimension next to the sales_fact_1998 Dimension. Select the
time_ID key field in the sales_fact_1998 Dimension, and drag it time_ID in the newly
added time_by_day Dimension (Fig. 3). Note that a join is now defined between the
two dimensions (later you will need to repeat the same process for defining joins to
the store, product and promotion dimension separately).

Page 8 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 9 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 10 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 11 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Fig. 3

5. Next you must declare the detail members for each new dimension. Each dimension
should contain the members listed in the bullets below. These members represent the
detail level of your dimension for example “Month” from the time_by_day table (Fig
4). Check the “Allow duplicates” and “Define Order” boxes for each case and click
Next.

 time_by_day: Month
 store: Store_Name
 promotion: Promotion_Name
 products: Product_Name

Page 12 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 13 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 14 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Fig. 4

6. Since we indicated a need to define order, which will be used in our hierarchy, we are
then prompted with an “Order Preference” dialog box. This dialog box will perform the
Order by/Ascending/Descending SQL commands while creating the cube from the data
source tables. Double click the field name to move it to the right and use commas to
separate field names. Use the combo box to change the left side from field names to
Ascending/Descending order (Fig. 5). Below is a list of how you should order your field
names. (Note we chose the_month as our dimension member, which is varchar however
we will use the field name month_of_year (int) along with the year and quarter to set the
order preference).

 time_by_day: year, quarter, month_of_year ASC


 store: store_country, store_state, store_city, store_name ASC
 products: brand_name, product_name ASC
 promotion: media_type, promotion_name ASC.
After order the field names click Next . This will Open the Define Aliases Dialog Box
.Click Next . This will open Define Properties Dialog Box .Again click next .You will see

Page 15 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

the Define Hierarchy Dialog Box which will set a hierarchy .Now follow step 7 to set up
a hierarchy.

Fig. 5

7. The hierarchy dialog box (Fig 6) shows a left side pane with all available table fields
and a right side pane used to create a hierarchy. Click once on the field name to highlight
it and drag it to the right to define the hierarchy. For example for time_by_day table, first
highlight year and drag it to its dimension on the right. Then highlight Quarter field on
the left and drag it to the right placing it on year so that it appears below it. Quarter is
now considered the child member to the parent member, year. Note that you do not need
to drag month over as it has already been defined as the detail member in step 5. In each
case check the “Create Aggregate Total Member” box. Below are the field names that
you will use to define you hierarchy in each case.

 Time_by_day: year -> quarter


 Store: store_country -> store_state -> store_city
 Promotion: media_type
 Products: brand_name

Page 16 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Fig. 6

Page 17 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 18 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 19 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 20 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 21 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 22 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 23 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 24 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 25 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 26 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 27 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 28 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 29 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Page 30 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

8. Now you may click OK to complete the cube. Xchange will synchronize the data
source with the new proCube database containing the cube and indicate the number of
data points that have been successfully added or updated to the cube.

Page 31 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

C. Perform a basic analysis of the cube.

1. From the Slice Menu select New to load a complete worksheet of the data.

2. The interface allows you to reposition the data on the worksheet by dragging
dimensions to and from the three list boxes on the left hand side. (Note you can
move any combination of dimensions to and from each list box).

 Page box: Displays for the entire page those facts that are to be measured.
You may only use one detail or aggregate at a time.
 Columns: Sets the dimension(s) that will be displayed along the columns.
Best suited for the time dimension. Multiple details or aggregates may be
used.
 Rows: Sets the dimensions(s) that will be displayed along the rows.
Multiple details or aggregates may be used.

3. Each time you reposition the dimensions or drill down to a subset of data you
must recalculate the slice by pressing the F9 key or the “Recalculate Slice Button”
which has a calculator icon. You may use trial and error to reposition your
dimensions and perform drill-downs recalculating the sheet each time. Position
the worksheet so that page displays 1998 store_sales, by store and promotion.
Time_by_day should be across the columns and products contained in the rows.
Press F9. The page may initially return all zeros, which just indicates that you
need to drill down and create an appropriate subset of data to measure.

Page 32 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

4. You can drill down into the data by double clicking on any dimension to view the
Edit Dimension dialog box that allows you to select a particular member or group
of members to analyze. Double click time_by_day. The left side pane has two
tabs which show the members and their hierarchy. The Sum symbol adjacent to a
member indicates that member as an aggregate. The Pound symbol indicates a
detail level member. The right side pane shows all the members that are currently
loaded on the worksheet for that particular list box. (Note the page list box will
only return the member highlighted in yellow while the column and row list boxes
will return all the members loaded to the right hand side of this edit box).

5. Click the Hierarchy tab and explode the time_by_day dimension down to the
quarter then month for 1998. (Remember we selected month_of_year (int) field as
ascending while setting order preferences, which allowed for the correct ordering
of the_month (varchar) detail member).

6. Clear the contents of the right side pane by clicking the “Clear All” button (eraser
icon).

7. Create a subset of time_by_day by selecting the first and second quarter months
and drag them to the right side list box. Also bring over the aggregates Q1 and Q2
(Fig. 7). (You may reposition any detail or aggregate in any order by dragging
the items in the right side pane).

8. Click the OK button (check mark icon) to accept this subset of the time_by_day
dimension.

Page 33 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

Fig. 7

9. Change the other dimensions as follows:


 Sales_fact_1998: store_sales
 Promotion: Radio (aggregate)
 Store: USA (aggregate)
 Product: (American (all details followed by the aggregate) and Blue Label
(all details followed by the aggregate)

10. Press the Recalculate Slice button (or F9 key) to view the data for this particular
subset of the time dimension.

Page 34 of 35
Il-Yeol Song, College of Information Science & Technology, Drexel University

OLAP HW #1, Creating OLAP cubes using ProCube Client, INFO 607

11. Create, print and save an Excel Worksheet of this data by selecting Worksheet
from the Slice menu or by pressing F8 (Note: proper installation of proCube
should have loaded two proCube Add-in components to your version of Microsoft
Excel. If your excel worksheet does not load properly, make sure the proCube
Add-In components have been added to your version of Excel by going to Tools
menu in Excel and selecting Add-ins. You should see both “proCube” and
“proCube Add-in” checked).

12. Save the proCube slice of data by selecting Save from the Slice menu (or the Save
Slice button from the tool bar). Name the slice “HW1”. Save the overall cube and
close out proCube.

Page 35 of 35

Вам также может понравиться