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
tell me 5 situations when we r using oracle db stages like orecle connector, oracle enterprise
Notification Activity
Define oconv () and iconv () functions in datastage?
What are the functionalities of link collector?
whom do you report?
Can you explain how could anyone drop the index before loading the data in target in datastage?
AGGREGATOR default datatype
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
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.
What is the use of datastage designer?
if i have two tables table1 table2 1a 1a,b,c,d 1b 2a,b,c,d,e 1c 1d 2a 2b 2c 2d 2e how can i get data as same as in tables? how can i implement scd typ1 and type2 in both server and in parallel? field1 field2 field3 suresh , 10,324 , 355 , 1234 ram , 23,456 , 450 , 456 balu ,40,346,23 , 275, 5678 how to remove the duplicate rows,inthe fields?
What is the use of datastage director?
Can you explain link buffering?
create a job that splits the data in the Jobs.txt file into
four output files. You will direct the data to the
different output files using constraints. • Job name:
JobLevels
• Source file: Jobs.txt
• Target file 1: LowLevelJobs.txt
− min_lvl between 0 and 25 inclusive.
− Same column types and headings as Jobs.txt.
− Include column names in the first line of the output file.
− Job description column should be preceded by the
string “Job
Title:” and embedded within square brackets. For example, if
the job description is “Designer”, the derived value
is: “Job
Title: [Designer]”.
• Target file 2: MidLevelJobs.txt
− min_lvl between 26 and 100 inclusive.
− Same format and derivations as Target file 1.
• Target file 3: HighLevelJobs.txt
− min_lvl between 101 and 500 inclusive.
− Same format and derivations as Target file 1.
• Rejects file: JobRejects.txt
− min_lvl is out of range, i.e., below 0 or above 500.
− This file has only two columns: job_id and reject_desc.
− reject_desc is a variable-length text field, maximum
length
100. It should contain a string of the form: “Level out of
range:
What are the functionalities of link partitioner?