This is an index post for the series of posts with examples on how to create packages programmatically. Creating and adding tasks to a control flow is pretty straightforward, but programmatically adding data flow components can be tricky due to the interaction with the native COM APIs. Each post will provide a simple scenario for using each component.
All samples are done using SQL Server 2008, but will also work with 2005 with minor code modifications.
I’ll continue to update this post as more samples are added. Please post in the comments if there are specific data flow components you’d like to see.
General
- http://blogs.msdn.com/mattm/archive/2008/12/30/create-a-package-with-a-data-flow-task.aspx
- http://blogs.msdn.com/mattm/archive/2009/08/03/debugging-a-comexception-during-package-generation.aspx
- http://blogs.msdn.com/mattm/archive/2009/08/03/looking-up-ssis-hresult-comexception-errorcode.aspx
Sources
- http://blogs.msdn.com/mattm/archive/2008/12/30/api-sample-oledb-source-and-oledb-destination.aspx
- http://blogs.msdn.com/mattm/archive/2008/12/30/api-sample-ado-net-source.aspx
Transforms
- http://blogs.msdn.com/mattm/archive/2008/12/30/api-sample-conditional-split.aspx
- http://blogs.msdn.com/mattm/archive/2009/01/02/api-sample-data-conversion.aspx
- http://blogs.msdn.com/mattm/archive/2009/01/02/api-sample-lookup-transform.aspx
- http://blogs.msdn.com/mattm/archive/2008/12/30/api-sample-row-count-transform.aspx
Destinations
- http://blogs.msdn.com/mattm/archive/2008/12/30/api-sample-oledb-source-and-oledb-destination.aspx
For an end to end solution, check out the http://www.codeplex.com/SQLSrvIntegrationSrv/Release/ProjectReleases.aspx?ReleaseId=17647 available on codeplex.
Other resources
- http://msdn.microsoft.com/en-us/library/ms345167.aspx
- http://msdn.microsoft.com/en-us/library/ms403347.aspx
- http://msdn.microsoft.com/en-us/library/aa337077.aspx