Input file one has data as shown below
1
2
3
4
5
6
7
8

Input file two has data like
6
7
8
9
10
11

Design a data stage job which will provide me three output files as shown below:
Output 1
6
7
8

Output 2
1
2
3
4
5

Output 3
9
10
11

Let me know your answers

Answers were Sorted based on User's Feedback



Input file one has data as shown below 1 2 3 4 5 6 7 8 Input file two has data like 6 7..

Answer / sant532reddy

seq file1 and file2 as input to change capture stage and then a switch stage with case=0,1,2 (on change code). Case=0 will give 6,7,8. Case=1 will give 1,2,3,4,5 and case=2 will give you 9,10,11

Is This Answer Correct ?    1 Yes 0 No

Input file one has data as shown below 1 2 3 4 5 6 7 8 Input file two has data like 6 7..

Answer / suresh

Actually we observe 1st output has common numbers of two inputs,remaining outputs have indiaviduals wrt to input data.

Suppose we validate the application using equivalence partitioning using this approach.

Same as we validate boundary value wrt two inputs can approach this one.

Is This Answer Correct ?    0 Yes 1 No

Input file one has data as shown below 1 2 3 4 5 6 7 8 Input file two has data like 6 7..

Answer / pavani

by using join type=full outer.we have to get output has 2 columns. 1st_column values are first inputs and remaining nulls,2_column values are second input and remaining are nulls.
then by using transformer write a constraint
1.output----->1st_column=2_column;
2.output----->2_column=null or'';(depending on input data)
3.output----->1st_column=null or'';(depending on data)

Is This Answer Correct ?    0 Yes 2 No

Input file one has data as shown below 1 2 3 4 5 6 7 8 Input file two has data like 6 7..

Answer / sant532reddy

Use input file1 as after file and input file2 as before file to a change capture stage. Change capture stage generates change code 0 for 6,7,8 & 1 for 1,2,3,4,5 and 2 for 9,10,11. Use a filter/switch stage after change capture stage to write records to output file1 when change code is 0, to output file2 when change code is 1 and to output file3 when change code is 2.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Data Stage Interview Questions

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 &#8722; min_lvl between 0 and 25 inclusive. &#8722; Same column types and headings as Jobs.txt. &#8722; Include column names in the first line of the output file. &#8722; 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 &#8722; min_lvl between 26 and 100 inclusive. &#8722; Same format and derivations as Target file 1. • Target file 3: HighLevelJobs.txt &#8722; min_lvl between 101 and 500 inclusive. &#8722; Same format and derivations as Target file 1. • Rejects file: JobRejects.txt &#8722; min_lvl is out of range, i.e., below 0 or above 500. &#8722; This file has only two columns: job_id and reject_desc. &#8722; reject_desc is a variable-length text field, maximum length 100. It should contain a string of the form: “Level out of range: <min_lvl>”, where <min_lvl> is the value in the min_lvl field. My Question is how do you write the stage variable for reject rows.

0 Answers   HCL,


plz tell me some dimentional and fact table names in banking project?

2 Answers   Virtusa,


what is .dsx files

3 Answers   IBM,


What is Cleanup Resources and when do you use it?

2 Answers  


client know skid info?

0 Answers   NTT Data,






what is executable in DataStage?

2 Answers  


i hav source like this . deptno,sal 1,2000 2,3000 3,4000 1,2300 4,5000 5,1100 i want target like this target1 1,2000 3,4000 4,5000 target2 2,3000 1,2300 5,1100 with out using transformer

2 Answers  


Can you implement SCD2 using join, transformer and funnel stage?

0 Answers   Cognizant,


what will happen if we allow duplicates in datastage lookup abort drop record 1st value of duplicate record none

1 Answers   Wipro,


What is a delta record? How you will read it?

0 Answers   EDS,


What are system variables and sequencers in datastage

0 Answers  


tell me abt Datastage trigger?

1 Answers   HP, IBM,


Categories