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
Why we use surrogate key?
What is active and passive stage?
What is the difference between an operational datastage and a data warehouse?
What all are the different way to run a job?
Define orabulk and bcp stages?
State the difference between an operational datastage and a data warehouse?
What is use Array size in datastage
Differentiate between odbc and drs stage?
Hi, what is use of Macros,functions and Routines..? At what situation you are used. If you know the answer please explain it. Thanks.
How to write a expression to display the first letter in Caps in each word using transformer stage ? Please let me know ASAP Thanks in advance...
How many types of views are there in a datastage director?
How to reverse the string using SQL?
describe the Steps to confiure a Qlogic switch
What are the stages in datastage?
What are the some differences between 7.x and 8.x version of datastage?