A C#.NET toolkit for writing SSIS Script Tasks

  • Comments posted to this topic are about the item A C#.NET toolkit for writing SSIS Script Tasks

  • Lesson 17:

    Never use MessageBox.Show in the course of your automated ETL process. It blocks operation of the remaining code until a button is pressed. Instead, favour logging to a log provider with the Log method, or firing an event to be handled by the Package, with FireInformation.

    Otherwise, that's a good introduction to script tasks...

  • I was using MessageBox.Show as a development tool to illustrate what the code is doing.

    Of course you would not include them in production code.

  • Great Stuff!! Thanks for posting this Stan.

    I'm fairly new to SSIS and have been trying to determine how to gain sufficient C# skills for those occasions when I really need a script task. I think you've solved a large part of my problem and provided a great foundation.

  • This is a great summary of the main things one would need to know about scripting as it relates to SSIS. Of course with .NET there are endless possibilities, but this is a great start! Thank you.

  • A useful follow-up to this would be some code to consume and re-output a data flow - this would be a verycommon task, and is a little fiddly to understand

  • "Double-click on the Script Task and select "Microsoft Visual Basic 2008" from the Script Language drop-down list, "

    really - is that the best way to get C# code?

  • How do you do it?

  • One small issue - there is no "C#.NET"; it's just called "C#".

    VB gained the ".NET" suffix to differentiate it from the pre-.NET versions, but C# was created at the same time as .NET, and so never needed the suffix.

  • This was really fun to go through. I'm looking for other tutorials on C# to use in SSIS, but am only seeing videos. Anyone know of a good site to walk through?

  • I am not sure what you mean by "consume and re-output a data flow."

    If I can figure out what you are talking about I will probably write about it.

    Thanks!

  • Hi Stan, thanks for this. Quite a nice introduction.

    This is maybe a bit late in the discussion, but I think what "Old Hand" means by "consume and re-output" a data flow is where a C# script task sits in the middle of a set of task processing a data flow and where it takes in a stream coming from a previous task and outputs data in such a way that it can be taken in by a following task.

    That would interest me as well.

    Gerard

  • Excellent post! Thank you for taking the time.

  • Stan, thank you for this excellent tutorial. I knew a lot of it already but wish I had read this before I started adding variables to script task in SSIS, took my awhile to realize that the starting value never changes in the variables window only in memory.

    In Lesson 5 you wrote ' (Add using System.Collections; to the namespace listing.) '. For Lesson 6 could you add '(Add using System.IO; to the namespace listing.)'? That could be confusing to a total newbie (me a year ago :-)).

  • Many thanks Stan for posting this.

    CodeMinkey

Viewing 15 posts - 1 through 15 (of 19 total)

You must be logged in to reply to this topic. Login to reply