How to read multiple files at different directories using a
single Sequential File stage in DS Enterprise Edition
Answer Posted / venkata ramana
To read given number of files, one can use follow below
In the sequential file stage, Use
Read Method =File Pattern
File Pattern=`ls /* | head -<Number of files to be read>`
For example, I had 5 files, with similar pattern (as
date*.txt), in working folder say "/data/working/". If we
want to read three files out of these five files, one can
use following command:
`ls /data/working/date*.txt | head -3`
Just modified Venkat's Answer based on tested job.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
AGGREGATOR default datatype
How to clean the datastage repository?
What are system variables and sequencers in datastage
What all are the different way to run a job?
What are the components of ascential data stage?
What are stage variables?
How can we perform the 2nd time extraction of client database without accepting the data which is already loaded in first time extraction?
How to find value from a column in a dataset?
What are the stages in datastage?
What is use Array size in datastage
how many rows sorted in sort stage by default in server jobs
How to convert RGB Value to Hexadecimal values in datastage?
Can you explain tagbatch restructure operator?
What are the steps required to kill the job in Datastage?
Difference between ‘validated ok’ and ‘compiled’ in data stage?