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
Where do the datastage jobs get stored?
How to read the length of word in unix?
How to manage date conversion in Datastage?
how to connect source to db?generally what r stages u used? how to find the data is having delimiter format?
Can you define merge?
What are the repository tables in datastage?
Differentiate between datastage and datastage tx?
how to run a sequential file stage in parallel if the stage is used on the TARGET side
What are the stages in datastage?
root tree will find which is server job and which is parallel job?
what is 'reconsideration error' and how can i respond to this error and how to debug this
what are the errors,warnings in datastage
how to implement scd2 in datastage 7.5 with lookup stage
Differentiate between validated and Compiled in the Datastage?
What is a datastage job?