November 14, 2018 at 8:19 am
in what case/situation may i want to use Scripting task as source in data flow?
Why/when is it better than the other sources ?
Likes to play Chess
November 14, 2018 at 8:43 am
VoldemarG - Wednesday, November 14, 2018 8:19 AMin what case/situation may i want to use Scripting task as source in data flow?
Why/when is it better than the other sources ?
You would use a Script Component (not a task, that isn't the same) when one of the supplied Source Components can't be used; for example your data doesn't confirm to normal formats, or it's from a source that isn't part of those available.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
November 14, 2018 at 8:47 am
I've used it for parsing few similar but with own specifics fixed length text files.
There was a header with important note and summary fields that needed checking against the data.
So with the script task I read the file only once:
Read the header, get the notes, check some asserts and read summary data.
Then a loop with ReadLine from StreamReader and parsing the line.
There were specifics in dates and money amount representations so I've wrote generic parsing helper functions for the different types.
At the end check if the summary data from the header matches calculated summaries during data reading.
The only ugly part is that in the DataBuffer for each field there is different property Field_IsNull that needs to be set when you need to pass null as result and this breaks the encapsulation.
November 14, 2018 at 9:01 am
VoldemarG - Wednesday, November 14, 2018 8:19 AMin what case/situation may i want to use Scripting task as source in data flow?
Why/when is it better than the other sources ?
I've used it when getting data from web services (eg, Google Analytics). As Thom mentioned, it's a Script Component, not a Script Task.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply