Database Reference
In-Depth Information
12.
Right click the data flow design surface and choose Execute Task from the context
menu. Visual studio will launch this data flow task with its debugging engine.
13.
when the task is complete, stop Visual studio's debugger and verify that the task ran
successfully; if there are errors, troubleshoot and try again.
14.
open sQl server Management studio and verify that dimFactTitlesAuthors has data
in it.
Configure the Fill FactSales Data Flow Task
our last table to fill is the Factsales table.
1.
navigate to the data Flow tab and select the Fill Factsales data Flow Task from the
data Flow Task dropdown box.
2.
Add an olE dB data source to the data Flow surface. Rename it to get sales data
olE dB destination.
locate the comment -- 2g) Get source data from pubs.dbo. sales in the
sQl code file and review the code beneath it. The code should look like listing 8-8.
3.
Listing 8-8. SQL Code from pubs.dbo.sales
Select
[OrderNumber]=Cast(ord_num as nVarchar(50))
,[OrderDateKey]=DateKey
--, title_id
,[TitleKey]=DimTitles.TitleKey
--, stor_id
,[StoreKey]=DimStores.StoreKey
,[SalesQuantity]=qty
From pubs.dbo.sales
JOIN DWPubsSales.dbo.DimDates
On pubs.dbo.sales.ord_date=DWPubsSales.dbo.DimDates.date
JOIN DWPubsSales.dbo.DimTitles
On pubs.dbo.sales.Title_id=DWPubsSales.dbo.DimTitles.TitleId
JOIN DWPubsSales.dbo.DimStores
On pubs.dbo.sales.Stor_id=DWPubsSales.dbo.DimStores.StoreId
4.
Edit the olE dB data source to connect to the dwPubssales connection.
5.
Click the Preview button to verify that the query worked successfully.
6.
Click the Columns page to force the XMl to be written properly in the .dtsx file.
7.
Close the olE dB source Editor window by clicking the oK button.
8.
Add an olE dB data destination to the data Flow surface. Rename it to Fill
Factsales olE dB destination.
9.
Connect the data Flow Path from the source to the destination.
10.
Edit the olE dB data destination so that it imports data to the Factsales table
(similar to Figure 8-14 ).
 
Search WWH ::




Custom Search