All Forums Tools
lcarmonm 1 post Joined 09/15
30 Sep 2015
TPT - MULTIPLE OUTPUT FILES DINAMICALLY ?

Hi all,  this is my first time here, and I hope anyone could help me.
I need to know if it is possible to create multiple output files by using TPT, but every  output file name  must be created based on the value of a table field.
Example:
 I have a table with hundred millions rows, and two files: Filename and Type.
Its content:
FileName      Type
F1                 Blue
F1                 Red
F2                 Dog
F3                 Cat
F3                 bIRD
 
I need to download  that table on multiples files, as many as different filename values I have in that table.
According to the example I would obtain three output files, F1, F2, F3, whose content would be:
For output file "F1":
Blue
Red
 
For output file "F2 ":
Dog
 
For output file "F3":
Cat
Bird
 
As the amount of files to be produced, as well as their names, are variable and uncertain, is there any way to do it by using any kind of definition in tpt based on arrays or dynamic filelist or whatever?
I've been diving a lot but I couldn't get any example.
Thanks a lot
 

feinholz 1234 posts Joined 05/08
30 Sep 2015

"Derived" file names is not currently supported in TPT.
The file writer operator has no knowledge of where the data came from.
It just receives rows of data from the operator that is pulling data from Teradata.
 

--SteveF

You must sign in to leave a comment.