February 19, 2013 at 4:11 am
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
February 19, 2013 at 4:26 am
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
==========================================================================================================================
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
February 19, 2013 at 7:24 am
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
February 20, 2013 at 6:14 am
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.
February 20, 2013 at 3:25 pm
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.
February 20, 2013 at 5:00 pm
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
select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply