Print Filenames from Seq File using FilePattern
Posted: Thu Mar 06, 2008 2:49 pm
Hi,
I would appreciate your inputs on how to get the filenames that are selected by a sequential file stage in an output store (Peek stage for now)
Here is what I am trying to do in a test job. This is an RCP enabled job.
Sequential file stage is set to read using "File Pattern" for "Read Method" property.
The "File Name Column" property is set to be fileNameColumn.
The column definition has been updated to be VarChar(128).
The "File Pattern" property is a job parameter so that i can supply different folder names during execution.
When i run this job with an input value of D:/Temp/TestFiles/*.txt which has 5 ".txt" files, it shows a different count altogether in the log
The file names are not logged and instead i see
I have left the remaining settings of the Seq file stage intact.
Is this how it would work or am i missing any additional setting/logic?
When i use this logic in a program to consume text files into a database, the data are loaded correctly. It is just that i am unable to print the file name portion.
Let me know if any additional details to help you help me.
Thanks in advance for your time
I would appreciate your inputs on how to get the filenames that are selected by a sequential file stage in an output store (Peek stage for now)
Here is what I am trying to do in a test job. This is an RCP enabled job.
Code: Select all
SequentialFileStage ==> Peek
The "File Name Column" property is set to be fileNameColumn.
The column definition has been updated to be VarChar(128).
The "File Pattern" property is a job parameter so that i can supply different folder names during execution.
When i run this job with an input value of D:/Temp/TestFiles/*.txt which has 5 ".txt" files, it shows a different count altogether in the log
The file names are not logged and instead i see
Code: Select all
D:/Temp/TestFiles/*.txt
D:/Temp/TestFiles/*.txt
D:/Temp/TestFiles/*.txt
....
....
....
10 times as the PEEK stage in my job is set to 10 rows by default.
Is this how it would work or am i missing any additional setting/logic?
When i use this logic in a program to consume text files into a database, the data are loaded correctly. It is just that i am unable to print the file name portion.
Let me know if any additional details to help you help me.
Thanks in advance for your time