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

What are the prerequisites for join stage

2 Answers  


How many jobs in ur project? Explain any complex job u have done in ur project?

1 Answers   IBM, TCS,


What are the different type of jobs in datastage?

0 Answers  


What is the importance of the exception activity in datastage?

0 Answers  


i have one table with one column in this column i have three rows like 1,1,2 then that rows populate to target as first tow rows as one row and remaing row as one row how it posible? COLUMN_NAME SHIVA RAMU MADHU THEN I WANT TO LIKE SHIVA AND RAMU IN ONE ROW AND MADHU IS ONE ROW IF ANY ONE KNOW PLZ TELL ME

3 Answers   Cap Gemini,






Hi frnds, my scenario is like i'm having a record 1234"1323£3434%343434^23232!1212$23232 in the above record all the special characters must be removed.how can we do it in datastage 8.0.1.can any one please ans this? thanx in advance

2 Answers   IBM,


Source flat file contains src --- 1 2 ' ' ' 18 we had 3 targets T1 T2 T3 -- -- -- 1 4 7 2 5 8 3 6 9 10 13 16 11 14 17 12 15 18 How can i get? **Using only datastage, but not unix or any other. I am expecting the answer soon.. Thanks in advance.

7 Answers  


In a table 100 records are there after 50records job is aborted how can u insert all records in target table.

1 Answers   Cap Gemini,


What are stage variables, derivations and constants?

0 Answers  


Nls stands for what in datastage?

0 Answers  


What is data partitioning?

0 Answers  


where we use config file as parameter ?

1 Answers   IBM,


Categories