hi this is kiran
i have one table i want divide the table with two different
table like even rows and odd rows
how can i do this one
tell me plzz

Answers were Sorted based on User's Feedback



hi this is kiran i have one table i want divide the table with two different table like even rows ..

Answer / eswar

oracle stage--->surrogate key generator--->transformer

the t/f having 'mod' function

mod(empkey,2)=0 --->even rows
mod(empkey,2)<>0 --->odd rows

empkey is generated from surrogate key generator

Is This Answer Correct ?    3 Yes 0 No

hi this is kiran i have one table i want divide the table with two different table like even rows ..

Answer / farzana kalluri

Hi we can achive like this

Source--->Transformer---->filter--->2 targets

Transformer--->1.constraints--->mod(input,2)=0

2.constraint---->mod(input,2)=1
From this we can get the odd numbers in one target and
even numbers in one target...

Is This Answer Correct ?    2 Yes 0 No

hi this is kiran i have one table i want divide the table with two different table like even rows ..

Answer / srinu

sourc->transformer->filter->two targets
in the transformer stage we have append new column and
derviation area write mod(@outrownum,2) (where @outrownum in
sysvarible)
after that we put fileter or switch in that
write condition on append column 0 then even records
1 then go odd records

Is This Answer Correct ?    1 Yes 0 No

hi this is kiran i have one table i want divide the table with two different table like even rows ..

Answer / nish

You could also go for a column generator and cycle the values 1,0.
then filter based on this column.

It will be much faster then employing a transformer stage having to generate @rownum and then do a mod calculation.

Trying to reduce the number of transformer stages is a key efficiency best practice.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Stage Interview Questions

table actions available in oracle connector?

0 Answers   CTS,


hi, 1)totally how many jobs created in ur project 2)what is ur datamart size & Dwh size 3)How secure ur project 4)could u plz tell be about testing process after complete the job will run sucessfully or not in Datastage

1 Answers   Wipro,


how can we do null handling in sequential files

2 Answers   Reliance,


In a batch if a job fails in between and you want to restart the batch from that particular job and not from the scratch then what will you do?

0 Answers  


if the source file is CID,CCODE,CONNDATE,CREATEDBY 0000000224,1000,20060601,CURA 0000000224,2000,20050517,AFGA 0000000224,3000,20080601,TUNE 0000000225,1000,20020601,CURA 0000000225,2000,20050617,AFGA 0000000225,3000,20080601,TONE AND TARGET is oracle following are the validations cid loaded with unique records leading zeors has to be deleted while loading cid in target load only customer who got early connected to company conn_date should be loaded into oracle date format cid datatype is varchar2 in target conn_date is data datatype ccode is varchar2 0000000224,1000,20060601,CURA 0000000224,1000,20060601,CURA

2 Answers  






options available in sequence job to run,validate?

0 Answers   CTS,


how can we create rank using datastage?what is the meaning of rank?

0 Answers   IBM,


file having these input and we have to get 3 output using same job Input 1 1 1 2 3 4 4 4 o/p1 o/p2 o/p3 1 1 2 2 1 3 3 1 4 4 4

0 Answers  


What is difference between join, merge and lookup stage?

0 Answers  


in oracle target stage when we use load option and when we use upsert option?

0 Answers  


Hi , Today 1000 records updated, tomorrow 500 records updated how to find that?

4 Answers   Wipro,


I have the following columns in the EMP table Empid,Empname,Sal,month(Sal),year(Sal) and DOB(let us say the dob is 15th-Jan-1981) Desing a job such that the output contains the following empname,year(sal),tot(sal) and current age i.e. whether 18yrs or so on

1 Answers   Accenture,


Categories