tags:

views:

18

answers:

1

We create a lot of console apps, ssis packages to extract data from our database to be used in downstream applications. Some are excel files, some are CSV files.

What i'm looking to do is build a dynamic, configurable extract engine that I can customize what elements the group wants and have those files extracted.

Has anyone solved this before?

A: 

Most databases come with applications that have built-in "export as CSV" functionality. Most even come with console tools that can do it without any user interaction (i.e. you give it a file with SQL).

Or you could write a program to do it. I would imagine that in any programming language, such a program would be somewhere between 5 and 15 lines of code. Take 2 arguments on the command line, one the filename of a piece of SQL, one an output filename. Run the SQL, loop through the results and dump them (as CSV) to the output.

Adam Batkin