Database Reference
In-Depth Information
11.
Click the Mappings page to force the XMl to be written properly in the .dtsx file and
verify that the mappings look logically correct.
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 complete, stop Visual studio's debugger and verify that the task ran
successfully or troubleshoot any errors and try again.
14.
open sQl server Management studio and verify that Factsales has data in it.
Configure the Add Foreign Key Constraints Execute SQL Task
one last task to go! we need to configure an Execute sQl task that replaces the foreign key constraints we
dropped that the beginning of the process.
locate the comment -- Step 3) Add Foreign Keys back in the sQl code file
and review the code beneath it. The code should look like listing 8-9.
1.
Listing 8-9. Code That Adds the Foreign Keys Back to the Database
-- Step 3) Add Foreign Keys back (Will be used with SSIS Execute SQL Tasks)
Alter Table [dbo].[DimTitles] With Check Add Constraint
[FK_DimTitles_DimPublishers]
Foreign Key ([PublisherKey]) References [dbo].[DimPublishers] ([PublisherKey])
Alter Table [dbo].[FactTitlesAuthors] With Check Add Constraint
[FK_FactTitlesAuthors_DimAuthors]
Foreign Key ([AuthorKey]) References [dbo].[DimAuthors] ([AuthorKey])
Alter Table [dbo].[FactTitlesAuthors] With Check Add Constraint
[FK_FactTitlesAuthors_DimTitles]
Foreign Key ([TitleKey]) References [dbo].[DimTitles] ([TitleKey])
Alter Table [dbo].[FactSales] With Check Add Constraint [FK_FactSales_DimStores]
Foreign Key ([StoreKey]) References [dbo].[DimStores] ([Storekey])
Alter Table [dbo].[FactSales] With Check Add Constraint [FK_FactSales_DimTitles]
Foreign Key ([TitleKey]) References [dbo].[DimTitles] ([TitleKey])
Alter Table [dbo].[FactSales] With Check Add Constraint [FK_FactSales_DimDates]
Foreign Key ([OrderDateKey]) References [dbo].[DimDates] ([DateKey])
Alter Table [dbo].[DimTitles] With Check Add Constraint [FK_DimTitles_DimDates]
Foreign Key ([PublishedDateKey]) References [dbo].[DimDates] ([DateKey])
2.
Highlight this code, right-click it, and choose Copy from the context menu.
3.
navigate to the Control Flow tab and select the Add null date lookup Values Execute
sQl Task.
4.
Edit the Add null date lookup Values Execute sQl Task by right-clicking the task
and selecting Edit from the context menu.
5.
select the Connection property. A dropdown box appears in the dialog window that
will let you configure this property.
 
Search WWH ::




Custom Search