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
What is ibm datastage flow designer?
What is orabulk stage?
Have you have ever worked in unix environment and why it is useful in datastage?
how to delete one row in target dataset
What is the different type of jobs in datastage?
What steps should be taken to improve Datastage jobs?
What are the steps required to kill the job in Datastage?
Have you used Unstructured data?
What is the difference between an operational datastage and a data warehouse?
how to abort the job its matain duplicates?
what is flow of project?
what is stage is used for below Input columns: dept|mgr|employee|salary Output columns: mgr|count of employee per mgr|avg salary per dept note: each dept has one mgr and each mgr has many employees
How can we perform the 2nd time extraction of client database without accepting the data which is already loaded in first time extraction?
AGGREGATOR default datatype
What are the types of jobs we have in datastage?