Você está na página 1de 3

Lab H: Creating an Outer Package

DTS Lab H: Creating an Outer Package


In this lab, you will create an outer package to execute the following packages:

Time_dim

Customer_dim

Product_dim

Sales_stage

Sales_fact

If you have trouble completing the lab, please refer to the answer file at
C:\BITechnicalTraining\DTS\AnswerFiles\Lab H sales_outer.dts.

Exercise 1
Creating the Sales_outer Package
To create a new package
In Enterprise Manager, right-click the Data Transformation Services
folder, and then click New Package.

To execute Time_dim
.1 In the package go to the Task toolbar and click the Execute Package Task.
.2 On the General tab of the Execute Package Task Properties dialog box,
type Time_dim in the Description box.
.3 In the Location list, click SQL Server.
.4 Click the ellipsis next to the Package name box, click the time_dim
package, and then click OK.
.5 Click OK to close the Execute Package Task Properties dialog box.

To execute Customer_dim
.1 In the Task toolbar, click the Execute Package Task.
.2 On the General tab of the Execute Package Task Properties dialog box,
type Customer_dim in the Description box.
.3 In the Location list, click SQL Server.
.4 Click the ellipsis next to the Package name box, click the customer_dim
package, and then click OK.
.5 Click OK to close the Execute Package Task Properties dialog box.

APAC BI Technical Training

Lab H: Creating an Outer Package

To execute Product_dim
.1 In the Task toolbar, click the Execute Package Task.
.2 On the General tab of the Execute Package Task Properties dialog box,
type Product_dim in the Description box.
.3 In the Location list, click SQL Server.
.4 Click the ellipsis next to the Package name box, click the product_dim
package, and then click OK.
.5 Click OK to close the Execute Package Task Properties dialog box.

To execute Sales_stage
.1 In the Task toolbar, click the Execute Package Task.
.2 On the General tab of the Execute Package Task Properties dialog box,
type Sales_stage in the Description box.
.3 In the Location list, click SQL Server.
.4 Click the ellipsis next to the Package name box, click the sales_stage
package, and then click OK.
.5 Click OK to close the Execute Package Task Properties dialog box.

To execute Sales_fact
.1 In the Task toolbar, click the Execute Package Task.
.2 On the General tab of the Execute Package Task Properties dialog box,
type Sales_fact in the Description box.
.3 In the Location list, click SQL Server.
.4 Click the ellipsis next to the Package name box, click the sales_fact
package, and then click OK.
.5 Click OK to close the Execute Package Task Properties dialog box.

To set up precedence constraints


In this procedure, you will add precedence constraints so that the time_dim,
product_dim, sales_stage, and customer_dim package execute in parallel.
Upon successful completion of these packages the sales_fact package will
execute.
.1 Click the Sales_stage Execute Package Task, press the CTRL key, and then
click the Sales_fact Execute Package Task.
.2 Click the Workflow menu and then click On Success.
.3 Click the Product_dim Execute Package Task, press the CTRL key, and
then click the Sales_fact Execute Package Task.
.4 Click the Workflow menu and then click On Success.
.5 Click the Customer_dim Execute Package Task, press the CTRL key, and
then click the Sales_fact Execute Package Task.
.6 Click the Workflow menu and then click On Success.
.7 Click the Time_dim Execute Package Task, press the CTRL key, and then
click the Sales_fact Execute Package Task.
.8 Click the Workflow menu and then click On Success.

APAC BI Technical Training

Lab H: Creating an Outer Package

To execute the DTS package


In this procedure, you will run the DTS package.
.1 Click the Execute play button on the toolbar, or click the Package menu,
and then click Execute.
.2 Click OK in the Package Execution Results dialog box.
.3 For any step that failed, double-click the steps name to display the error
message for the step, and then click Done.

To save the DTS package


In this procedure, you will save the DTS package.
.1 Click the Package menu, and then click Save As.
.2 Use the information in the following table to save the DTS package to your
local SQL Server. Accept the defaults for any options that are not listed,
click OK, and then close DTS Package Designer.
Parameter

Value

Package name

sales_outer

Location

SQL Server

To verify package results


.1 Open Query Analyzer.
.2 In the Connect to SQL Server dialog box, click OK.
.3 Go to the database list in the toolbar and click polaris.
.4 Type the following query:
SELECT * FROM sales_stage

.5 Click the Execute Query play button on the toolbar.


.6 Review data results. You should have 2155 records loaded to the
sales_stage table. Verify a single record of data by using the following table.
Column name

Value

customer_id

VINET

product_id

11

amount_sales

168.0000

quantity_sales

12

order_date

1997-07-29 00:00:00.000

.7 Type the following query:


SELECT * FROM sales_fact

.8 Click the Execute Query play button on the toolbar.


.9 Review data results. You should have 2155 records loaded to the sales_fact
table.

APAC BI Technical Training

Você também pode gostar