How to populate filename to column name in the table

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

Can you use a Folder stage to read files, you will just have to define wildcard and directory path ? Are all files in Same Format ? First row splitter will deconcatenate all individual lines in teh record column using Multipel Lines option the input to this column will be the RECORD column output from a folder stage ( a transformer to isolate row splitter and folder is recommended ) . Then it gets even simpler to use a second row splitter whose output table def will be the same as a table def of any given sequential file, and splitting the column output from rowsplitter #1 . If there are 100 files , looping through sequencer may increase execution time.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Hmmm... the Folder stage was built to read XML files, regular old flat files tend to confuse it at times. I've used it to generate a list of filenames from a directory of files but I'm not sure I would ever rely on it to consume any number of flat files reliably day after day.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply