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

Prepared by Kesavan Krishnan

Lab Topic 6: Loading Data into a


Data Warehouse
Tasks:
Continues from Topic 5……
Lookup Transformation to Insert or
Update Dimension Data

Drag Data Flow Task into Control Flow workplace.


Lookup Transformation to Insert or
Update Dimension Data

Double click or right click on the data flow task and select edit.
Lookup Transformation to Insert or
Update Dimension Data

Select AdventureWorks2012 as data connection


Lookup Transformation to Insert or
Update Dimension Data

Select Table or view as Data access mode. Select Sales.SalesOrderDetail as Name of


the table. Examine the column.Click OK.
Lookup Transformation to Insert or
Update Dimension Data

Drag Lookup into Data Flow workplace and give a link between
OLE DB Source and Lookup.
Lookup Transformation to Insert or
Update Dimension Data

Select Full cache as cache mode, OLE DB connection manager as Connection type,
and Fail component as Specify how to handle rows with no matching entries.
Lookup Transformation to Insert or
Update Dimension Data

Under the Connection on the left layout, select Production.


Product as Use a table or view.
Lookup Transformation to Insert or
Update Dimension Data

Under the Columns on the left layout, give the link between ProductID from
Available Input Columns to ProductID in Available Lookup Columns, and
select Name under Available Lookup Columns.
Lookup Transformation to Insert or
Update Dimension Data

Drag OLE DB Destination into the Data Flow workspace


and connect Lookup to OLE DB Destination.
Lookup Transformation to Insert or
Update Dimension Data

Select Lookup Match Output as Output.


Lookup Transformation to Insert or
Update Dimension Data

Right click on OLE DB Destination. Select Table or view as Data


access mode.
Lookup Transformation to Insert or
Update Dimension Data

Click on New and create a new table as Name of the table or


the view.
Lookup Transformation to Insert or
Update Dimension Data

Check Mapping. Click OK. Execute the task.


Lookup Transformation to Insert or
Update Dimension Data

Right click on the link between Lookup and OLE DB Destination


and select Enable Data Viewer.
Lookup Transformation to Insert or
Update Dimension Data

Execute the task.


Lookup Transformation to Insert or
Update Dimension Data

Can view the Lookup Match Output Data Viewer.


Data Flow Source Adapters

Under the connection manager, right click, select New OLE DB Connection.
Data Flow Source Adapters

Select AdventureWorks2012 as data connection


Data Flow Source Adapters

Drag Data Flow Task to Control Flow workplace. Double click on Data Flow Task.
Data Flow Source Adapters

Drag OLE DB Source to Data Flow workplace. Right click, Select Edit.
Select AdventureWorks2012 as connection manager. Click OK.
Data Flow Source Adapters

Select AdventureWorks2012 as OLE DB Connection, Table or view as


Data access mode,and HumanResources. Employes as Name of the table
or the view.
Data Flow Source Adapters

Under Column, Unselect all columns, except OrganizationLevel, BirthDate, MaritialStat


Click OK.
Data Flow Destination Adapters

Drag Flat File Destination to control flow. Give a link between OLE DB Source and
Flat File Destination. Right click on Flat File Destination, Select Edit.
Data Flow Destination Adapters

Click New, Select Delimited. Click OK.


Data Flow Destination Adapters

Click Browse, look for your destination to save the file. Give a file name. Click Open. Click OK.
Data Flow Destination Adapters

Check Mapping. Click OK.


Data Flow Destination Adapters

Right click on Flat File Destination, Select Advanced Editor.


Change to False under ValidateExternalMetadata.
Q&A

Best of luck !!!!

You might also like