Database Reference
In-Depth Information
14.
Right click the data flow design surface and choose Execute Task from the context
menu. Visual studio launches this data flow task with its debugging engine (Figure
8-18 ).
15.
when the task is complete, stop Visual studio's debugger and verify that the task
ran successfully; or, if there are errors, troubleshoot and try again. You can stop the
debugger using the debug menu or by clicking the link at the bottom of the screen.
16.
open sQl server Management studio and verify that dimAuthors has data in it.
Tip: Common errors include primary and foreign key violations. if those happen to you, try running
the Execute sQl tasks that you created in Exercise 7-3 to clear the table data and drop the foreign key
constraints. You can run both by executing the Prepare ETl Process sequence container.
Fill DimStores Data Flow task
Congratulations, dimAuthors has data! let's do the same for dimstores.
1.
navigate to the data Flow tab and select the Fill dimstores 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 stores data
olE dB destination.
locate the comment -- 2b) Get source data from pubs.dbo. stores in the
sQl code file and review the code beneath it. The code should look like listing 8-2.
3.
Listing 8-2. Source Data from pubs.dbo.stores
Select
[StoreId]=Cast( stor_id as nChar(4) )
, [StoreName]=Cast( stor_name as nVarchar(50) )
From pubs.dbo.stores
4.
Add this code to the sQl command text code area of the olE dB data source
(similar to Figure 8-8 ).
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
dimstores 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 dimstores table
(similar to Figure 8-14 ).
 
Search WWH ::




Custom Search