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


Please Help Members By Posting Answers For Below Questions

CHANGE CAPTURE

1100


How do you schedule or monitoring the job?

886


Whats difference betweeen operational data stage (ods) and data warehouse?

901


Hi, what is use of Macros,functions and Routines..? At what situation you are used. If you know the answer please explain it. Thanks.

1838


how many rows sorted in sort stage by default in server jobs

3762


Can you explain players in datastage?

965


hi.... am facing typical problem in every interview " I need some critical scenarios faced in real time" plz help me guys

2647


What is the difference between informatica and datastage?

903


im new to this tool im now at project plz tell me step by step process how to design plz help me i wnt to go with exp for job plz give me d proper design and explination

1870


Explain the importance of surrogate key in data warehousing?

936


Hi guys, Please design a job for dis requirement with derivation(solution). my source table like dis. emp_no qualification 1 a 1 c 2 a 3 c 3 b To loaded to target like dis emp_no qualification 1 b 2 b 2 c 3 a my requirement is every employer have three qualifications i.e a,b and c. what qualification missed in source table that will be move to target systems. Hope u got it the requirement. Right Thanks.

2666


table actions available in oracle connector?

1369


Where the datastage stored his repository?

800


What is aggtorec restructure operator?

1104


What are transforms and what is the differenece between routines and transforms?

838