You are on page 1of 8

1-28 Introduction to Data Warehousing

Lab 1: Exploring a Data Warehousing Solution

Exercise 1: Exploring Data Sources


Scenario
Adventure Works uses various software applications to manage different aspects of the
business, and each application has its own data store. Specifically:

M
C
T
U
S
E
O
N
L
Y.
S
T
U
D
E
N
T
U
S
E

Internet sales are processed through an e-commerce web application.

Reseller sales are processed by sales representatives, who use a reseller sales
application. Details of the sales employees themselves are stored in a separate human
resources system.

Reseller payments are processed by an accounting application.

The senior sales executives use a SharePoint application to manage reseller account
managers.

Products are managed in a product catalog and inventory system.

Some business partners, such as the marketing agency that Adventure Works
uses to conduct marketing campaigns, provide data to Adventure Works through
cloud-based data stores.

This distribution of data has made it difficult for business users to answer key questions
about the overall performance of the business.

In this exercise, you will examine some of the data sources within Adventure Works that will
be used in the data warehousing solution.

M
C
T
U
S
E
O
N
L
Y.
S
T
U
D
E
N
T
U
S
E

10777A: Implementing a Data Warehouse with Microsoft SQL Server 2012 1-29

The main tasks for this exercise are as follows:


1.

Prepare the lab environment.

2.

View the solution architecture.

3.

View the Internet Sales data source.

4.

View the Reseller Sales data source.

5.

View the Products data source.

6.

View the Human Resources data source.

7.

View the Accounts data source.

8.

View the Regional Account Managers data source.

9.

View the staging database.

X Task 1: Prepare the lab environment

Ensure that the MIA-DC1 and MIA-SQLBI virtual machines are both running, and then log
on to
MIA-SQLBI as ADVENTUREWORKS\Student with the password Pa$$w0rd.

Run the Setup Windows Command Script fle (Setup.cmd) in the


D:\10777A\Labfles\Lab01\Starter folder as Administrator.

X Task 2: View the solution architecture

Use Paint to view the Adventure Works DW Solution.jpg JPEG image in the
D:\10777A\Labfiles\Lab01\Starter folder, and note the data sources in the solution
architecture.

X Task 3: View the Internet Sales data source

Use Microsoft SQL Server Management Studio to open the View Internet Sales.sql
Microsoft
SQL Server query file in the D:\10777A\Labfiles\Lab01\Starter folder. Use Windows
authentication to connect to the localhost instance of SQL Server.

Execute the query and examine the results. Note that this data source contains data
about customers and the orders that they have placed through the e-commerce web
application.

X Task 4: View the Reseller Sales data source

Use SQL Server Management Studio to open the View Reseller Sales.sql Microsoft
SQL Server query fle in the D:\10777A\Labfiles\Lab01\Starter folder.

Execute the query and examine the results. Note that this data source contains data
about resellers and the orders that they have placed through Adventure Works
reseller account managers.

X Task 5: View the Products data source

Use SQL Server Management Studio to open the View Products.sql Microsoft SQL
Server query file in the D:\10777A\Labfiles\Lab01\Starter folder.

Execute the query and examine the results. Note that this database contains data about
products that
Adventure Works sells, and that products are organized into categories and
subcategories.

1-30

Introduction to Data Warehousing

X Task 6: View the Human Resources data source

Use SQL Server Management Studio to open the View Employees.sql Microsoft SQL
Server query file in the D:\10777A\Labfiles\Lab01\Starter folder.

Execute the query and examine the results. Note that this database contains data
about employees, including sales representatives.

X Task 7: View the Accounts data source

M
C
T
U
S
E
O
N
L
Y.
S
T
U
D
E
N
T
U
S
E

Examine the comma-delimited text files in the D:\10777A\Accounts folder by opening


them in
Microsoft Excel 2010, and note that they contain details of payments that resellers have
made.

Close all files when you have finished reviewing them.

X Task 8: View the Regional Account Managers data source

Use Internet Explorer to view the SharePoint site at http://mia-sqlbi, and examine the
Regional Account Managers list. There is a link to the Regional Account
Managers list in the Quick Launch area of the SharePoint site home page.

X Task 9: View the Staging database

In SQL Server Management Studio, in the Object Explorer pane, examine the tables in
the Staging database in the localhost instance of SQL Server (ensure you examine
the Staging database, not the DQS_STAGING_DATA database).

Note that all tables other than dbo.ExtractLog in this database are empty.

Results: After this exercise, you should have viewed data in the InternetSales,
ResellerSales, and Products SQL Server databases; viewed payments data in commadelimited fles; viewed a list of regional account managers in a SharePoint site; and viewed
an empty staging database.

M
C
T
U
S
E
O
N
L
Y.
S
T
U
D
E
N
T
U
S
E

10777A: Implementing a Data Warehouse with Microsoft SQL Server 2012 1-31

Exercise 2: Exploring an ETL Process


Scenario

Now that you are familiar with the data sources in the Adventure Works data warehousing
solution, you will examine the ETL process that is used to stage the data, and then load it
into the data warehouse.
Adventure Works uses a solution based on SQL Server Integration Services to perform
this ETL process. The main tasks for this exercise are as follows:
1.

View the solution architecture.

2.

Run the ETL staging process.

3.

View the staged data.

4.

Run the ETL data warehouse load process.

X Task 1: View the solution architecture

Use Paint to view the Adventure Works DW Solution.jpg JPEG image in the
D:\10777A\Labfiles\Lab01\Starter folder, and note the ETL processes in the solution
architecture.

1-32 Introduction to Data Warehousing

X Task 2: Run the ETL staging process

M
C
T
U
S
E
O
N
L
Y.
S
T
U
D
E
N
T
U
S
E

Open the AdventureWorksETL.sln solution fle in the D:\10777A\Labfles\Lab01\Starter


folder with
SQL Server Data Tools which is a Microsoft Visual Studio-based development
environment).

In the Solution Explorer pane, view the SSIS packages that this solution contains, and
then double- click Stage Data.dtsx to open it in the designer. The package should
resemble this.

View the control flow of the Stage Data.dtsx package, and then run the package by
clicking Start Debugging on the Debug menu. The package will run other
packages to perform the tasks in the control flow. This may take several minutes.

When the package has finished running, a message box will be displayed. After viewing
this message box, stop the package by clicking Stop Debugging on the Debug
menu.
Note The message box may be hidden by the Visual Studio window. Look for
a new icon on the taskbar, and then click it to bring the message box to the
front.

X Task 3: View the staged data

Use SQL Server Management Studio to view the Staging database in the localhost
instance of SQL Server (take care to view the Staging database, not the
DQS_STAGING_DATA database).

Note that some of the tables now contain data.

M
C
T
U
S
E
O
N
L
Y.
S
T
U
D
E
H
IB
IT
E

10777A: Implementing a Data Warehouse with Microsoft SQL Server 2012 1-33

X Task 4: Run the ETL data warehouse load process

In Visual Studio, in the Solution Explorer pane, view the SSIS packages that the
AdventureWorksETL solution contains, and then double-click Load DW.dtsx to open
it in the designer. The package should resemble this.

View the control flow of the Load DW.dtsx package, and then run the package by
clicking Start Debugging on the Debug menu. The package will run other
packages to perform the tasks in the control flow. This may take several minutes.

When the package has finished running, a message box will be displayed. After
viewing this message box, stop the package by clicking Stop Debugging on the
Debug menu.
Note The message box may be hidden by the Visual Studio window. Look for
a new icon on the taskbar, and then click it to bring the message box to the
front.

h
o
e
e
Results:
After this exercise, y ou should have viewed
and run the SQL Server Integration
h
a
Services
packages
t at perform
the ETL process for the Adventure Works data warehousing
solution.

1-34

Introduction to Data Warehousing

Exercise 3: Exploring a Data Warehouse


Scenario
Now that you have explored the ETL process that is used to populate the Adventure
Works data warehouse, you can explore the data warehouse itself to see how it enables
business users to view key business information.
The main tasks for this exercise are as follows:
1.

View the solution architecture.

2.

Query the data warehouse.

X Task 1: View the solution architecture

Use Paint to view the Adventure Works DW Solution.jpg JPEG image in the
D:\10777A\Labfiles\Lab01\Starter folder, and note the data warehouse in the solution
architecture.

X Task 2: Query the data warehouse


Use SQL Server Management Studio to open the Query DW.sql Microsoft SQL Server
query file in the
D:\10777A\Labfiles\Lab01\Starter folder.

M
C
T
U
S
E
O
N
L
Y.
S
T
U
D
E
N
T
U
S
E

Use Windows authentication to connect to the localhost instance of SQL Server,


and execute the query in the AWDataWarehouse database.

Execute the query and examine the results. Note that the data warehouse contains the
data necessary to view key business metrics across multiple aspects of the business.

Results: After this exercise, you should have successfully retrieved business
information from the data warehouse.

M
C
T
U
S
E
O
N
L
Y.
S
T
U
D
E
N
T
U
S
E

10777A: Implementing a Data Warehouse with Microsoft SQL Server 2012 1-35

Module Review and Takeaways

Review Questions
1.

Why might you consider including a staging area in your ETL solution?

2.

What options might you consider for performing data transformations in an ETL solution?

3.

Why would you assign the data steward role to a business user rather than a
database technology specialist?
For More Information For more information about Best Practices for Data
Warehousing with SQL Server 2008 R2, see http://go.microsoft.co m/fwlink/?
LinkID=246719.

You might also like