One Star

Dynamic output Filename for tFileOutputDelimited

Hi There,
I have a question regarding dynamic filename creation.
I have the following scenario:
tMSSQLoutput ------> tMAP -------->tFileOutputDelimited
columns in scenarios:
I want to have the output Filename in the tFileOutputDelimited to be dynamic and it will come from the "columns in scenarios"
I want the filename like: d:\sample\name+date.csv

thanks in advance
One Star

Re: Dynamic output Filename for tFileOutputDelimited

Only way I can think of is tflowtoiterate, but that would generate a file for each row and that's probably not what you want?
One Star

Re: Dynamic output Filename for tFileOutputDelimited

Are you using tMSSQLoutput as an input to tMAP... I don't think it is allowed..
If you are using input component..
There are few things which u need to take care of..
1. The no. of records u are retriving from the input component.. if it is one then it is fine..We can use context variable to store name & date value and can add it to the file name.. The same can also be done if the name & date value remains same for all the records.
2. If the records fetched are more and the values are changing then we may have problem.. You need to try it out the same way.. I guess a few no. of file will get created in that case.
In the second case you can decide if you want to have the first records name and date to be the file name.. In that case u can limit the no of input records to be one..
tMSSQLinput(limit the record to be 1)---->tMAP(save the name & date value to a context variable)-->tlogrow
| (on sub job ok)
continue your job..
This should work.. Give a try..
One Star

Re: Dynamic output Filename for tFileOutputDelimited

I there,
OK. I will make it more simpler.
I have a table TABLE1. now, i want to transfer the data in that table to CSV file.
so, this is what i did:
tMSSQLOutput -----------> tMAP ------------------> tFileoutputDelimited
finally, I want the filename of the CSV file to be the name of the TABLE1 column like c:\sample +table column+ output.csv