About SSIS and Code

time to read 2 min | 309 words

I just saw Sahil's post SSIS, and I couldn't help but cringe at the last words of the post. While in theory you can write code that will write an SSIS package for you, you really don't want to do that. The issue is that the whole thing is completely under documented, uses COM interop in the strangest way (sometimes you've a managed wrapper, sometimes you don't, there are things that you can't do from the COM interfaces, so you need the managed wrapper, and things that you can't do from the COM interfaces).

I present to you, in its entirely the MSDN code to create a package:

class CreatingAPackage { Package package; public CreatingAPackage() { package = new Package(); } }

I'm not sure who wrote this masterpiece, but I wouldn't call it documenting the code. I need to write code that would handle loads of table, I want to be able to create a dataflow object and programmatically generate output columns from the input columns, and shoving things there after I did some transformation on them.

No go. Oh, it's certainly possible, I'm sure. But I've no idea where to start writing such a thing. I looked at the examples, and I read the blogs, I searched in Google and I Reflectored till my eyes crossed. I'm not going to spent a couple of weeks becoming an expert on SSIS just so I could save a couple of days of one-off manual work, which is a pity.