SSIS Programming Examples

I have been creating SSIS packages programmatically and have run into somewhat of a dead end. I have found the examples provided with the SQL 2005 install very helpful, but they only cover setting up three tasks: Sort task, OleDB Source and a Flat File Destination.

Does anyone have any examples or knows of examples of using the Merge Join task and the Conditional Split task

I'm doing it all programmatically and so far I'm having trouble finding much in the way of documentation or examples.

Any help would be great!

Thanks,

Mark



Answer this question

SSIS Programming Examples

  • shakey slidewell

    Hi Mark,

    You need to find the Correct String for Setting up the Component Custom property. Once you find that then its fairly Simple. Custom properties for each of the component is mentioned in the MSDN.

    Like Custom Property for Conditional Split is "FriendlyExpression", you call the method SetOutputProperties on the Design Time instance of the Conditional Split, And set your condition.

    Similarly for Merge Join custom property is "JoinType" and "NumKeyColumns" you need to set these values accordingly.

    Rest is same how you do for any other component.

    Set the input column, map the externalmetadata, map the meta data to output column...etc.

    If you are stuck at any particular point let me know.

    Thanks

    Dharmbir


  • RafOv

    I have been building packages programmatically, too. Sorry, but I don't have examples for the two tasks you mention, but I can offer some advice.

    I also found the existing documentation and samples to be brief and lacking the real depth needed to learn what is required to program the tasks programmatically.

    What I have found helpful is building what I needed manually in the Management Studio, copying the dtsx file to an .xml file then looking at it in IE. Scan through the objects and properties and find what you need to set to get the behaviour you want. It's not 1 to 1 correspondence, but it's pretty good at showing the properties you want to set and the values of what they contain. Then programmatically build your package and compare the XML to find what isn't right and make your corrections.

    Yes, I realize the irony in the brevity of this message and its distinct resembalance to some of the documentation I myself have cursed in recent weeks...

    Good Luck!


  • Petr Melichar

    I believe that this content has been in BOL since RTM.

    It is somewhat deeply nested within the TOC, within the section on building packages programmatically.

    -Doug


  • Roman Uvarov

    Doug, you are quite right it is there, but for some reason my local search is knackered.

  • Arthur_Saprykin

    The custom properties are now all documented on MSDN, and wil no doubt make the next Books Online drop - http://msdn2.microsoft.com/en-us/library/ms136014.aspx

    To see the values just create a package and use the Advanced Editor on those components which support it, which is most of them.



  • SSIS Programming Examples