I need to launch a monthly process to create a preformatted Text file. The data sources are in Database tables (sql server 2008 R2). It's necessary to perform some logic (ETL) on the data and then write the txt file.
I found 2 solutions.
First is: use a scheduled SSIS where i Extract, Trasform data with logic inside a Script Task (c#) and dump the results in the txt file
Second solution is: I could use SSIS with a script task only to call an action MVC (c# code and use WebClient.UploadData). Data Extraction, transformation and results dumping in a txt file is totally performed in the MVC action. I think that it should be better move the logic in a MVC action for the following pros:
Test Driven Development
Logging (with log4net)
Entity Framework
Reuse code logic of the WebApp
The future sql server migration could be simpler (dtsx migration) since the logic is outside the SSIS
I am more confident if all the application logic is in the WebApp: i prefer using SSIS only for huge ETL.
The Cons of the second solution is that it is necessary perform a security management of the MVC action call to avoid malicious calls.
QUESTION
What do you think is the best solution?
Logic inside or outside (WebApp MVC) SSIS?