i have source like
deptno,sal
1,2000
2,3000
3,4000
1,2300
4,5000
5,1100

i want target like

target1
deptno,sal
1,2000
3,4000
4,5000

target2
2,3000
1,2300
5,1100


with out using transformerstage

Answers were Sorted based on User's Feedback



i have source like deptno,sal 1,2000 2,3000 3,4000 1,2300 4,5000 5,1100 i want target like..

Answer / sarath

first generate the surrogate key (eg rownum). then using the filter stage give the condition where= (rownum%2=0) to one dataset and rejected to another dataset.
I think this will work.

correct me if im wrong.

Is This Answer Correct ?    10 Yes 0 No

i have source like deptno,sal 1,2000 2,3000 3,4000 1,2300 4,5000 5,1100 i want target like..

Answer / rafi

by using round robin partition with two nodes we can get the solution.

Is This Answer Correct ?    8 Yes 4 No

i have source like deptno,sal 1,2000 2,3000 3,4000 1,2300 4,5000 5,1100 i want target like..

Answer / naveen

seq1---------seq2


seq1 read the file.

seq2 ----give outfile1 and click on file give outfile2 then partition tab then select roun rabin partition key first column.

get the desired output.

Is This Answer Correct ?    1 Yes 1 No

i have source like deptno,sal 1,2000 2,3000 3,4000 1,2300 4,5000 5,1100 i want target like..

Answer / mrvprasad

1)First go to Seq File-->Columns-->Add RowNum column and
2)then go to Properties-->select Options-->select Row Number Column=RowNum (Drop down list select RowNum column)
we will get the sequence Numbers.

first do the link sort for Sal in transformer stage.

and in Transformer stage go to
Constraint: Mod(dslink1.RowNum,2)=0 ---o/p1

and then select otherwise check box or write Mod(dslink1.RowNum,2)=1 --->0/p2

Is This Answer Correct ?    0 Yes 1 No

i have source like deptno,sal 1,2000 2,3000 3,4000 1,2300 4,5000 5,1100 i want target like..

Answer / saran

using filter stage we can get output
in filter stage in where clause write condition like this
where sal in(2000,4000,5000) this to one dataset link
and specify reject link to another dataset

Is This Answer Correct ?    0 Yes 2 No

i have source like deptno,sal 1,2000 2,3000 3,4000 1,2300 4,5000 5,1100 i want target like..

Answer / thippareddy.p

From source copy the data into sets using copy or peak
stage then for each copy stage use remove duplicate stage
with duplicate to retain first and last you will get
desired output.....
Hope thios will help u.......

Is This Answer Correct ?    1 Yes 16 No

Post New Answer

More Data Stage Interview Questions

IN SEQUENTIAL FILE,I HAVE DATA LIKE THIS EID,ENAME 11,AA 11,CC 22,DD 33,EE 22,AA 22,BB 22,CC 11,BB THEN i SELECT perform sort ON eid,uncheck both unique,stable AND I CHOOSE hash SORTING.WHAT IS THE OUTPUT I CAN GET.what happend if i select UNIQUE,STABLE. PLEASE EXPLAIN HOW THE RECORDS DISPLAY AT TARGET.

1 Answers  


What is datastage?

0 Answers  


it is possible to load two tables data into one sequential file?if possible how?plz share with me?

6 Answers   TCS,


in sequtial file 2 columns avaliable,iwant only one column load the target how do it.

10 Answers   Wipro,


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

4 Answers   IBM, PR3 Systems,






what is executable in DataStage?

2 Answers  


Hi All , in PX Job I have passed 4 Parameters and when i run the same job in sequence i dont want to use those parameters , is this possible if yes then how

0 Answers   TCS,


i/p o/p1 o/p2 1 1 4 1 1 5 1 1 6 2 2 2 2 2 2 3 3 4 5 6 how to populates i/p rows into o/p1&o/p2 using datastage stages?and also the same scenario using sql?

8 Answers   IBM,


How rejected rows are managed in datastage?

0 Answers  


I am getting input value like X = Iconv(ā€œ31 DEC 1967ā€,ā€Dā€)? What is the X value? How it is? At what situation we r used Iconv(),Oconv().

1 Answers   Amdocs, TCS,


1.i have 5 jobs(1-5),i connect with each other,i want run from 3-5 only how? 2.how to schedual the job in datastage7.5 2? what is the deff bet grip and fgrep command? how do you cleanse the data in your project

1 Answers   Accenture,


Input Data is: Emp_Id, EmpInd 100, 0 100, 0 100, 0 101, 1 101, 1 102, 0 102, 0 102, 1 103, 1 103, 1 I want Output 100, 0 100, 0 100, 0 101, 1 101, 1 Means Indicator should either all ZEROs or all ONEs per EmpId. Impliment this using SQL and DataStage both.

6 Answers   IBM,


Categories