Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

1165


Chapter 52: Building, Deploying, and Managing ETL Workfl ows in Integration Services


52



  1. Double-click the Derived Column transform to open its editor.

  2. Enter Modifi edDate in the Derived Column Name fi eld.

  3. In the Derived Column box, click the drop-down arrow, and select <add as a new
    column>.

  4. Enter GetDate() in the Expression Box.

  5. Click OK.
    To confi gure the Lookup used to determine ProductID, follow these steps:

  6. Drag a Lookup transform from the data fl ow toolbox onto the Data Flow tab under
    the Derived Column transform.

  7. Click the Derived Column transform.

  8. Drag the green data fl ow path from the Derived Column transform to the Lookup
    transform.

  9. Double-click the Lookup transform to open its editor.

  10. Click Connection in the editor.

  11. Click the Use Results of a SQL Query button.

  12. Click inside the Query Editor.

  13. Type: Select ProductID, ProductNumber from Production.Product.

  14. Click Columns.

  15. Click and hold ProdNo from Available Input Columns.

  16. Drag to ProductNumber from Available Lookup Columns so that a line connects the
    two.

  17. Click the check box next to ProductID from available Lookup Columns.

  18. Click OK.
    You now added the ModifedDate and the ProductID columns to the Data Flow in this Data
    Flow Task. You are ready to map all the columns to the destination and run the package in
    debug mode.


To fi nish and map, follow these steps:


  1. Click the Lookup transform.

  2. Drag the green data fl ow path from the Lookup transform to the OLE Destination.

  3. The Input Output Selection dialog box appears. Click inside the output box, and
    select Lookup Match Output from the drop-down menu.

  4. Double-click the OLE DB Destination to bring up its editor.

  5. If not already chosen, choose your AdventureWorks Connection Manager for the OLE
    DB Connection Manager.


c52.indd 1165c52.indd 1165 7/31/2012 10:29:27 AM7/31/2012 10:29:27 AM


http://www.it-ebooks.info
Free download pdf