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 are the important features of datastage?
How can one find bugs in job sequence?
Triggers,VIEW,Procedures
What is the command line function to import and export the ds jobs?
Which algorithm you used for your hashfile?
Which commands are used to import and export the datastage jobs?
What is a ds designer?
Describe stream connector?
what is ds administrator used for?
What are the different types of lookups in datastage?
1)How will u implement SCD2 by using surrogate key. 2)What are the disadvantages with surrogate key. 3)How will you handle nulls in your project for the varchar, integer data types. 4)Can I use two fact tables in star schema. 5)3 jobs are running on the 2 nodes after I added one more node so can I compile those jobs to run on three nodes.
Name the command line functions to import and export the DS jobs?
What is the difference between server job and parallel jobs?
What is merge stage?
Difference between in process and inter process?