Lab Answer Key: Module 1: Introduction To Data Warehousing Lab: Exploring A Data Warehousing Solution

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Page 1 of 8

Lab Answer Key: Module 1: Introduction to Data


Warehousing

Th
Lab:is dExploring
oc
um a Data Warehousing Solution
en
tb
elo
sa ng
No ad st
un _2oM
00
Exerciseth1:
a u
or i
Exploring
9@
live
uh
am Data Sources
ze ma
dc . co dS
op m aa
ies d.
allo
we
Task 1: Prepare the Labd!Environment

1. Ensure that the 20767C-MIA-DC and 20767C-MIA-SQL virtual machines are


both running, and then log on to 20767C-MIA-SQL as
TADVENTUREWORKS\Student
his with the password Pa55w.rd
do
cu
me
nt
2. In thes D:\Labfiles\Lab01\Starter
be
lon folder, right-click Setup.cmd, and then click
No aa g s
d to
Run un as _administrator.
20 Mu
au 09 ha
t ho @ mm
riz live
ed . co ad
co m S
3. Click Yes when p ies promptedaato d. confirm that you want to run the command file, wait
allo
for the script to finish, we and then press any key to continue. This script can take
d!
several minutes to complete.

TaskTh2:
is dView the Solution Architecture
oc
um
en
tb
elo
sa ng
No ad st
1. In the
u na D:\Labfiles\Lab01\Starter
_ 20
09
oM
uh
folder, double-click Adventure Works DW
ut h @ am
or i livto
Solution.png ze
dc e.copen
om
mait.
dS
op aa
ies d.
allo
2. Examine the diagram, w ed and note that it shows several data sources on the left,
!
that provide the source data for the data warehouse. You will examine these
data sources in the remainder of this exercise.

about:blank 3/20/2019
Page 2 of 8

Note: In addition to the data sources that you will examine in this lab, the
diagram includes a Microsoft SQL Server Master Data Services model for
product data and a SQL Server Data Quality Services task to cleanse data as
it is staged. These elements form part of the complete solution for the lab
scenario in this course, but they are not present in this lab.

Th
is d
oc
me u
1. Minimizent the image. You will return to it in the next exercise.
be
sa lon
No ad gs
un to
_2
au Mu00
9@
t ho ha
riz live mm
ed . co ad
co m Sa
pie ad
sa .
Task 3: View the Internet llow Sales Data Source
ed
!

1. Start Microsoft SQL Server Management Studio (SSMS), and when prompted,
connect to the MIA-SQL database engine instance using Windows®
authentication.
Th
is d
oc
um
2. On theeFile
nt menu, point to Open and then click File.
be
sa lon
No ad gs
to _2
3. In uthe
na Open
u
00 FileMdialog
9 uh box, navigate to the D:\Labfiles\Lab01\Starter folder,
t ho @ am
riz ive ma l
click View ed Internet
c
.co Sales.sql,
m dS and then click Open.
op aa
ies d.
allo
4. we the query. When the query completes, review the results
Click Execute to rund!

and note that this data source contains data about customers and the orders
they have placed through the Adventure Works e-commerce website.

5. Keep SQL Server Management Studio open for the next task.
Th
is d
oc
um
en
tb
elo
sa ng
No ad st
un Mu _2 o
Task 4: View
au
t
the
00 Reseller
9@ ha Sales Data Source
ho live mm
riz
ed . co ad
co m Sa
pie ad
sa .
llow
1. On the File menu, epoint
d! to Open and then click File.

2. In the Open File dialog box, navigate to the D:\Labfiles\Lab01\Starter folder,


click View Reseller Sales.sql, and then click Open.

about:blank 3/20/2019
Page 3 of 8

3. Click Execute to run the query. When the query completes, review the results
and note that this data source contains data about resellers and the orders they
have placed through Adventure Works reseller account managers.

4. Keep SQL Server Management Studio open for the next task.
Th
is d
oc
um
en
tb
elo
sa ng
No st ad
Task 5:unView_the
20 Products
oM Data Source
au 09 uh
t ho @ am
riz live ma
ed . co dS
co m aa
pie d.
sa
1. On the File menu, llowpoint to Open and then click File.
ed
!
2. In the Open File dialog box, navigate to the D:\Labfiles\Lab01\Starter folder,
click View Products.sql, and then click Open.

3. Click Execute to run the query. When the query completes, review the results
Th
and
is d note that this source contains data about products that Adventure Works
oc
u
sells, morganized
en
tb into categories and subcategories.
elo
sa ng
No ad st
un _2
Mu for the next task. o
4. Keep
au SSMS
t
00 open
9@ ha ho live mm
riz
ed . co ad
co m Sa
pie ad
sa .
llow
ed
!

Task 6: View the Human Resources Data Source

1. On the File menu, point to Open, and then click File.


Th
is
2. In dthe
oc Open File dialog box, navigate to the D:\Labfiles\Lab01\Starter folder,
um
en
t
click sViewbelEmployees.sql,
on and then click Open.
No aa gs
to d_
un Mu 20
au ha 09
@ t ho
3. Click Execute
riz live runmm
to the query. When the query completes, review the results
ed . co ad
co Sa
and note that piethis m source contains
ad data about employees, including the sales
sa .
llow
representatives associated ed
! with reseller sales.

4. Minimize SSMS. You will return to it later in this exercise.

about:blank 3/20/2019
Page 4 of 8

Task 7: View the Accounts Data Source

1. View the contents of the D:\Accounts folder that contains several comma-
delimited text files.
Th
is
2. Double-click
do
cu Payments – AU.csv and open the file using Notepad.
me
n tb
elo
sa ng contents and note that it contains data about reseller payments
3. NReview
ou a d the
_2
filest
oM
na 00 uh
ut h 9
processed or i by lithe
@
ve
Adventure
am
ma
Works accounting system. Each file in the
ze . co
dc m d S
Accounts folder op
ies relates toapaymentsad
.
made by resellers in a specific country.
allo
we
d!
4. Close Notepad without saving any changes.

TaskT 8: View the Staging Database


his
do
cu
me
tb n
elo
1. NReturn
ou
s a a to
d_
SQL ng Server Management Studio.
st
na 2 oM
00 uh
ut h 9@ am
or i live ma
2. In Object dExplorer,
z e
co
.co expand d S Databases, expand Staging, and then expand
pie m aa
sa d.
Tables. llow
ed
!
3. Right-click the dbo.Customers table, and then click Select Top 1000 Rows.
When the query completes, note that this table is empty.

4. Repeat the previous step to verify that the dbo.EmployeeDeletes,


Tdbo.EmployeeInserts,
his dbo.EmployeeUpdates, dbo.InternetSales,
do
cu
me
dbo.Payments, dbo.Resellers, and dbo.ResellerSales tables are also empty.
nt
be
sa lon
No ad gs
Note: _ to
u na The 20 dbo.ExtractLog
09 Mu table contains data that is used to track data
ut h @ ha
or i live m ma
extractions ze from
dc .cthe
om InternetdS Sales and Reseller Sales data sources.
op aa
ies d.
allo
5. Minimize SSMS. You w ed will return to it in the next exercise.
!

about:blank 3/20/2019
Page 5 of 8

Result: After this exercise, you should have viewed data in the InternetSales,
ResellerSales, Human Resources, and Products SQL Server databases; viewed
payments data in comma-delimited files; and viewed an empty staging database.

Exercise 2: Exploring an ETL Process


Th
is d
oc
um
en
Task 1: View tthe
be Solution Architecture
lo sa ng
No ad st
un oM _2
au uh 00
9@t ho am
riz live ma
ed . co d S the solution architecture diagram.
1. Maximize Paintco
pie
and m view aa
sa d.
llow
ed
2. Note that the ETL solution ! consists of two main phases: a process to extract
data from the various data sources and load it into a Staging database, and
another to load the data in the Staging database into the data warehouse. In
this exercise, you will observe these ETL processes as they run.
Th
3. is d
Minimize Paint. You will return to it in the next exercise.
o cu
me
n tb
elo
sa ng
No ad st
un oM_2
au 00
uh
9@
t ho am
riz live ma
ed . co d
Task 2: Run the oETL
c
pie StagingSaProcess
m
ad
sa .
llow
ed
!

1. Start Visual Studio® from the task bar.

2. On the File menu, point to Open then click Project/Solution.

3. TIn
his
the Open Project dialog box, navigate to the D:\Labfiles\Lab01\Starter
do
folder,cu click AdventureWorksETL.sln, and then click Open.
me
nt
be
sa lon
No ad gs
4. If the
un Solution _2
0
Explorer
to
Mu pane is not visible, on the View menu, click Solution
au 09 ha
t ho @ mm click the pin icon to freeze it in position.
Explorer. riz If necessary,
ed
live
. co ad
co m Sa
pie ad
sa .
5. In Solution Explorer, llo we in the SSIS Packages folder, double-click Stage
d!
Data.dtsx to open it. Note that the staging process consists of five tasks:

about:blank 3/20/2019
Page 6 of 8

o Stage Internet Sales

o Stage Reseller Sales

o Stage Payments

o
Th
Stage Employees
is d
oc
um
o Notify
en
t b Completion
elo
sa ng
No ad st
un _2 oM
au 0 09 uh
t ho @ am
riz live ma
ed . co dS
co m aaStart Debugging, and then observe that the
6. On the Debug pie menu, click
sa d. staging
llow
process runs a SQL ed Server Integration Services package for each task.
!

7. When the message Staging process complete is displayed, click OK, and
then, on the Debug menu, click Stop Debugging. Note that the message box
might be hidden by the Visual Studio window. Look for a new icon on the
Ttaskbar,
his and then click it to bring the message box to the front.
do
cu
me
nt
8. Minimize bVisual
elo Studio. You will return to it later in this exercise.
sa ng
No ad st
un _ 20 oM
au 09 uh
t ho @ am
riz live ma
ed . co dS
co m aa
pie d.
sa
llow
Task 3: View the Staged ed Data
!

1. Return to SQL Server Management Studio.

2. If necessary, in Object Explorer, expand Databases, expand Staging, and then


Th
dois
expand
cu Tables.
me
n tb
elo
sa ng
3. NRight-click
ou ad
_2
the s tdbo.Customers table, and then click Select Top 1000 Rows.
oM
na 00 uh
ut h 9@
When othe riz query live completes,
am
ma note that this table now contains data that the ETL
ed . co d
co m Sa
process has pextracted
ies from ad the data source.
.
allo
we
d!
4. Repeat the previous step to verify that the dbo.EmployeeInserts,
dbo.InternetSales, dbo.Payments, dbo.Resellers, and dbo.ResellerSales
tables also contain staged data.

about:blank 3/20/2019
Page 7 of 8

5. Minimize SQL Server Management Studio. You will return to it later in this
exercise.

TaskTh4: Run the ETL Data Warehouse Load Process


is d
oc
um
en
tb
elo
sa ng
1. NReturn
ou a to
d _2 Visual s t Studio.
oM
na 00 uh
ut h 9@ am
or i live ma
ze .
2. In Solutiond cExplorer,op
co
m in dthe Sa SSIS Packages folder, double-click Load DW.dtsx
ies ad
.
to open it. Note athat llow the data warehouse loading process consists of a sequence
ed
!
of tasks to load various dimensions and facts. This is followed by a task to
determine the number of records loaded from each staging table before
truncating the staging tables, and a task to log the row counts.

3. On the Debug menu, click Start Debugging, and then observe that the data
Th
do is
warehouse
cu
m
loading process runs an SSIS package for the dimension or fact
en
tb
table sto be eloloaded. The process might take several minutes to complete.
n
No aa gs
d_ to
un 20 Mu
au ha 09
4. Whenthothe @
riz message
live Data
mm warehouse load complete is displayed, click OK,
. co ad
ed
m Sa co
and then, on the
p ies Debug menu, ad
. click Stop Debugging. Note that the message
allo
box might be hidden we by the Visual Studio window. Look for a new icon on the
d!

taskbar, and then click it to bring the message box to the front.

5. Close Visual Studio.

Th
is d
oc
um
en
Result: After t bthis exercise, you should have viewed and run the SQL Server
elo
sa ng
Integration
No aServices
d_ s t packages that perform the ETL process for the Adventure
oM
un 20
Works dataa 0 uh solution.
u tho warehousing
9@ am
riz l ive ma
ed . co d
co m Sa
pie ad
sa .
llow
ed
Exercise 3: Exploring! a Data Warehouse

about:blank 3/20/2019
Page 8 of 8

Task 1: View the Solution Architecture

1. Maximize Paint and view the solution architecture diagram.

2. Note that the data warehouse provides a central data source for business
reporting and analysis.
Th
is d
oc
um
3. en
Close Paint
t b without saving any changes.
elo
sa ng
No ad st
un _2
oM
au 00
uh
9@
t ho am
riz live ma
ed . co dS
co m aa
pie d.
sa
Task 2: Query the Data llow Warehouse
ed
!

1. Return to SQL Server Management Studio, and open the Query DW.sql query
file in the D:\Labfiles\Lab01\Starter folder.

Th
2. Click
is d Execute to run the query. When the query completes, review the results
oc
me u
and notent that the query uses the data warehouse to retrieve:
be
sa lon
No ad gs
un _2 to
au 00 Mu
t ho 9 @ ha
riz live mm
ed . co ad
co m Sa
pie ad
sa .
llow
o Total sales foredeach !
country by fiscal year.

o Total units sold for each product category by calendar year.

3. TClose
his SQL Server Management Studio without saving any changes.
do
cu
me
nt
be
sa lon
No ad gs
un _2 to
au 0 09 Mu
t ho @ ha
Result: After riz this
ed
exercise,
live mm you should have successfully retrieved business
ad
. co
information from co the data m Sa
warehouse.
pie ad
sa .
llow
ed
!

about:blank 3/20/2019

You might also like