How to read multiple files at different directories using a
single Sequential File stage in DS Enterprise Edition
Answer Posted / venkat
To read given number of files, one can use follow below
steps:
1. In the sequential file stage, Use Read Method as
Specific File(s).
2. Now in the file text field, Put below command.
`ls /* | head -<Number of files to be read>`
This will read given number of files.
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`
Hope this helps.
venkat
09940692102
| Is This Answer Correct ? | 0 Yes | 7 No |
Post New Answer View All Answers
How can we improve the performance in datastage?
Have you used Unstructured data?
What are the functionalities of link partitioner?
Where do the datastage jobs get stored?
how to abort the job its matain duplicates?
What is a datastage job?
What are the main features of datastage?
table actions available in oracle connector?
what are the errors,warnings in datastage
Hi All , in PX Job I have passed 4 Parameters and when i run the same job in sequence i dont want to use those parameters , is this possible if yes then how
Differentiate between validated and Compiled in the Datastage?
What are the different type of jobs in datastage?
What are the various kinds of the hash file?
Differentiate between odbc and drs stage?
What are the types of hashed files in data stage