Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

script task Expand / Collapse
Author
Message
Posted Tuesday, February 19, 2013 4:11 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, June 16, 2014 9:48 AM
Points: 43, Visits: 80
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
Post #1421532
Posted Tuesday, February 19, 2013 4:26 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Friday, August 22, 2014 9:02 AM
Points: 689, Visits: 2,779
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
Post #1421543
Posted Tuesday, February 19, 2013 7:24 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 9:23 AM
Points: 7,098, Visits: 12,605
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
Post #1421644
Posted Wednesday, February 20, 2013 6:14 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, August 18, 2014 5:26 AM
Points: 119, Visits: 483
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
Post #1422052
Posted Wednesday, February 20, 2013 3:25 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, October 2, 2013 1:49 AM
Points: 116, Visits: 289
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.
Post #1422335
Posted Wednesday, February 20, 2013 5:00 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: 2 days ago @ 12:42 PM
Points: 1,787, Visits: 5,696
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


  • MMGrid Addin
  • MMNose Addin


  • Forum Etiquette: How to post Reporting Services problems
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • How to Post Performance Problems - by Gail Shaw

  • Post #1422360
    « Prev Topic | Next Topic »

    Add to briefcase

    Permissions Expand / Collapse