The Script Component as a Source
In the previous recipe we had a real-world example of using a Transformation Script Component. Using a Script Component can be more effective when it plays the role of a Source in Data Flow.
There are times when default built-in sources within Data Flow cannot open a special source—some sources may be very old or very rarely used, and there are no appropriate connection providers or sources for them. In some cases, they could be source structures in special formats that the built-in sources couldn't open correctly. In such scenarios, later in this chapter Script Component as a Source will help us to write custom code and fetch data from every source in the way we need.
In this recipe, we have a Flat File with special formatting (this file is generated in the output of the next recipe), so the built-in Flat File source couldn't open it as we require. We will use a Script Component as Source and create outputs as well.
The following screenshot is a sample of our...