|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Monday, April 08, 2013 6:55 AM
Points: 43,
Visits: 76
|
|
Hi All,
i have been using ssis for few years now i have used most of the components/task but never script task i am a dba so cant do much coding
i am curious when to use script task where other components in ssis can't do the job
can any one please share a scenario where we must use script task
Thanks in advance
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 9:34 AM
Points: 595,
Visits: 2,128
|
|
Hi
i am curious when to use script task where other components in ssis can't do the job
Well there is your answer! 
One example would be to obtain the error message for a column that was redirected on error (not fail package) , by default SSIS provides the error number but in order to get to the text of the associated error you need a script task..
Its one that I have used quite a bit.
Here is an example
http://www.bidn.com/blogs/JSalvo/ssas/2428/ssis-using-the-script-component-to-obtain-an-error-description
========================================================================================================================== A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 2:41 PM
Points: 6,696,
Visits: 11,714
|
|
I use Script Tasks so I can have access to .NET to do things that are not built into SSIS (e.g. FileSystemWatcher class) or maybe are built into SSIS but are not easily consumable (e.g. the Execute Process Task can be cumbersome to configure if you have a lot of or have cryptic command-line parameters).
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: 2 days ago @ 7:09 AM
Points: 73,
Visits: 253
|
|
Hi,
I recently had to use a script task to get the modification date of a group of files within a folder. With the Foreach loop task is possible to iterate over a folder and get the file name, fully qualify or the name plus the extension but not other file attributes like de modified date. Then I used a script task and the System.IO C# Library. It would be great if this foreachloop component could be extended to retrieve different file attributes.
Hope that helps.
Paul Hernández http://hernandezpaul.wordpress.com/ https://twitter.com/paul_eng
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 3:58 PM
Points: 114,
Visits: 276
|
|
I use both ScriptTasks and ScriptComponents when I need the power of .NET to achieve a specific function.
ScriptTask - Use the Microsoft.AnalysisServices namespace to dynamically create partitions in SSAS.
ScriptComponent - Time slicing events and optimised aggregations within sorted data flows. The latter being when the input's sort keys match the primary keys in the aggregation. Bespoke code but makes the aggregation block much more memory efficient and semi-synchronous.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 9:18 AM
Points: 1,287,
Visits: 3,852
|
|
I use script tasks in the OnError events of executables to store the error messages for sending an alert email at the end of the job (I also use a script task to send the email - it's just easier for me as a developer to use the .NET mail classes.
MM
|
|
|
|