Seven Stars

SQL query output to a CSV file

I am working on an ETL job in which there is a table I query and have to write the rows returned by the query to a CSV file.
The issue is that the table which I query is created during the job execution because the columns to be included in the table are based on another query.
So the table structure may vary from execution to execution. Is there a way to output/write the rows generated from a "SELECT * FROM...." to a CSV file using a tFileDelimitedOutput component? 
The reason behind asking the question I would not able to define a schema for the output file that is to be created because of the dynamic structure of the table.
Twelve Stars

Re: SQL query output to a CSV file

this way named - welcome to subscription version Smiley Happy
Simplest case as described could be also realised by SQL
example in MySQL
SELECT CONCAT_WS(';','col1_name','col2_name', ... , 'colx_name')
SELECT CONCAT_WS(';',col1,col2,...., colx)

than You define source and target schema as only single column type string