I have a SSIS package which exports data from a query into a flat file, which will be used to import into a data warehouse. One of my requirements is to add a header row with the current date, and a footer row with total row count.
I would like to do this ideally in one script component or task using C# for tidiness in the package. I’m a noob when it comes to writing code. How can this be done? I’ve looked around on the net but can’t seem to find anything close enough to what I want.
This is what I eventually came up with! It is the cleanest, most simple way I can find of doing this task. It basically just builds up the header and trailer rows then appends to the dataset. Seems so simple once you’ve done it! It takes a bit of knowledge of C#, however it is well worth it than trying to do it in SQL.