Integration Services
Integration Services
Services
Table of Contents
Page 3 of 19
SQL Server™ 2005: Integration Services
Lab Setup
Tasks Detailed Steps
1. Log in. 1. Log in using the Administrator user account. The password is Pass@word1.
Page 4 of 19
SQL Server™ 2005: Integration Services
Exercise 1
Understanding the SSIS Interface
Scenario
In this exercise, you will examine and execute a simple SSIS package that loads data into a dimension table by using
the Data Flow task. You will then create a new project data source and a new package that mimics the design of the
first package.
The SSIS Designer is hosted in Business Intelligence Development Studio, an environment based on the Microsoft
Development Environment (Visual Studio 2005) shell. This environment provides an integrated development
environment for designing, creating, testing, debugging, and extending SSIS packages. To ease the complexity of
designing SSIS packages, separate editors for data flow and control flow are provided.
To implement the data load, you will:
Use Business Intelligence Development Studio to create a new project and add a pre-built package to a project.
Execute a package and view the graphical presentation of package execution.
Examine the new interface.
Create a new data source.
Create a new package, add a data source to the package, and use the Data Flow Task to load a dimension table
with a Derived Column transform in the package.
Page 5 of 19
SQL Server™ 2005: Integration Services
Page 6 of 19
SQL Server™ 2005: Integration Services
Page 7 of 19
SQL Server™ 2005: Integration Services
Figure 3: Use the pin icon to determine whether the toolbox is pinned down.
3. In the Control Flow Items list of the Toolbox, right-click Control Flow Items
and click Sort Items Alphabetically. If necessary, use the arrows to move up
and down to navigate through the list.
4. Drag and drop an Execute SQL Task onto the Control Flow Editor. Notice
how the task in the Control Flow Editor has a red cross indicating an error.
Hover the mouse over the task as in Figure 4 to display the error. (In steps 5 to
7, you will fix the error).
Page 8 of 19
SQL Server™ 2005: Integration Services
Page 9 of 19
SQL Server™ 2005: Integration Services
Page 10 of 19
SQL Server™ 2005: Integration Services
Page 11 of 19
SQL Server™ 2005: Integration Services
Figure 7: After completion, the diagram includes the number of affected rows.
4. When the package finishes its execution, select Debug | Stop Debugging.
15. Verify package 1. From the Windows task bar, select Start | All Programs | Microsoft SQL
results. Server 2005 CTP | SQL Server Management Studio. If asked to
authenticate, select the default values and click OK.
2. Select the Database Engine Query button in the upper-left corner of the
toolbar. If asked to authenticate, accept the default values.
3. In the Query window, type the following query:
USE AdventureWorksDW
SELECT * FROM SSISLabDimProduct
SELECT COUNT(*) AS RecordCount FROM SSISLabDimProduct
Page 12 of 19
SQL Server™ 2005: Integration Services
Exercise 2
Populating a Fact Table Using Lookups and Aggregates
Scenario
Suppose that the management team at Adventure Works wants to analyze sales data by reseller, product, sales
territory, and time.
The sales summary star is a summarized sales schema, which contains:
The fact table: SSISLabFactSalesSummary
The product dimension: DimProduct, DimProductSubCategory, and DimProductCategory tables
The reseller dimension: DimReseller table
The sales territory dimension: DimSalesTerritory table
The time dimension: DimTime table
In this exercise, you will add functionality to an existing package to load a fact table view. You will use the Lookup
transform with the Data Flow task to create relationships on application keys and return surrogate keys to load into
the fact table. You will then use the Aggregate transform to sum, average, and group values before loading into the
destination. You will also configure logging for this package.
To implement the data load, you will:
View the existing package and the lookup transforms defined for the fact table load.
Add another lookup transform to the package to return a surrogate key value.
Configure the Aggregate transform to perform aggregate functions (sum, average, and group by) to column
values and copy the result to the transformation output.
Define logs for the package.
Save, execute, and view results of the package execution.
Page 13 of 19
SQL Server™ 2005: Integration Services
DELETE dbo.SSISLabFactSalesSummary
Page 14 of 19
SQL Server™ 2005: Integration Services
Page 15 of 19
SQL Server™ 2005: Integration Services
Note that you can use auto layout on the Format menu to organize your package
layout. To do this, click an empty area within the Data Flow Editor and then select
the Format | Auto Layout | Diagram menu item.
The layout should look approximately like Figure 1.
Page 16 of 19
SQL Server™ 2005: Integration Services
Page 17 of 19
SQL Server™ 2005: Integration Services
USE AdventureWorksDW
SELECT * FROM SSISLabFactSalesSummary
SELECT COUNT(*) AS RecordCount FROM SSISLabFactSalesSummary
Page 18 of 19
SQL Server™ 2005: Integration Services
Page 19 of 19