how can we send even and odd records from a sequential file
to two different targets

Answers were Sorted based on User's Feedback



how can we send even and odd records from a sequential file to two different targets..

Answer / varma

In transformer specify constraints Mod(@INROWNUM,2) =1 for Odd records and Mod(@INROWNUM,2) = 0 for even records.

Is This Answer Correct ?    41 Yes 2 No

how can we send even and odd records from a sequential file to two different targets..

Answer / subhash

SeqFile--->Transformer=====>TGTFile1,TGTFile2

1. in SeqFile, add the 'Row Number Column' property and
name it as 'Row_Number'
2. in the Transformer, give the constraint for TGTFile1
link:
'MOD(Row_Number,2)=1'----> all the ODD rows
give the constraint for TGTFile2 link:
'MOD(Row_Number,2)=0'----> all the even rows.


If we use INROWNUM in transformer, then we need to run the
transformer on 'Single' NODE configuration.

Is This Answer Correct ?    18 Yes 0 No

how can we send even and odd records from a sequential file to two different targets..

Answer / skyboyfli

Hi kiran, how can u get even or odd numbers with round robin method. i think it is not possible.

Is This Answer Correct ?    8 Yes 4 No

how can we send even and odd records from a sequential file to two different targets..

Answer / rikan

same task without using transformer stage.

Source---->column generator stage--->filter stage---->2 targets

in column generator stage, select column tab, there create
column like skey and double click on starting point of that
row,we can get the metadata ,modification window--->there we
can give cycle=1 increment by 1 and ok.write the condition
in filter stage .we can get correct out put.

Is This Answer Correct ?    5 Yes 2 No

how can we send even and odd records from a sequential file to two different targets..

Answer / vinay

HAI KIRAN, CAN U EXPLINE ME DETAIL WITH SMALL EXAMPLE

Is This Answer Correct ?    1 Yes 0 No

how can we send even and odd records from a sequential file to two different targets..

Answer / govind reddy

In Transformation level
even records-mod(empno,2=0)
odd records-mod(empno,2!=0)

Is This Answer Correct ?    2 Yes 1 No

how can we send even and odd records from a sequential file to two different targets..

Answer / satya

Create new column record number in sequential file then in
Transformer check that record number is even or odd and
send them accordingly to o/p.

Is This Answer Correct ?    1 Yes 1 No

how can we send even and odd records from a sequential file to two different targets..

Answer / chunduri

varma answer is correct

Is This Answer Correct ?    0 Yes 0 No

how can we send even and odd records from a sequential file to two different targets..

Answer / deepu

we can use transfarmer stage,in the stage create surgatekey
and write constraint like mod(<surcatekeycolumn>/2)=0 in
one link and mod(<surgatekeycolumn>/2)=1 in another link.we
get even records and odd records

Is This Answer Correct ?    0 Yes 0 No

how can we send even and odd records from a sequential file to two different targets..

Answer / kiran

by using Round Robin Partition Technique

Is This Answer Correct ?    5 Yes 14 No

Post New Answer

More Data Stage Interview Questions

I have Seq file, I don't want 10, 11th(or any two records like 20, 30th records ) records in the output

6 Answers   TCS,


how to write server Routine coding?

0 Answers   Eric,


Source Like department_no, employee_name ---------------------------- 20, R 10, A 10, D 20, P 10, B 10, C 20, Q 20, S and Output should be like this department_no, employee_list -------------------------------- 10, A 10, A,B 10, A,B,C 10, A,B,C,D 20, A,B,C,D,P 20, A,B,C,D,P,Q 20, A,B,C,D,P,Q,R 20, A,B,C,D,P,Q,R,S

3 Answers  


WHERE YOU USE UNIX COMMANDS AS A ETL DEVELOPER?

2 Answers   Wipro,


If you want to use a same piece of code in different jobs, how will you achieve this?

0 Answers  






What are some different alternative commands associated with "dsjob"?

0 Answers  


explain about completely flow of sequencers technicaly,without using example??explain about lookup,nullhandling?

0 Answers   CGI,


How to use Environment variable's in datastage?(use of process)

1 Answers   CSC,


project Steps,hits, Project level HArd things,Solved methods?

0 Answers   Hexaware,


Source has 2 columns: USA,NewYork INDIA,MUMBAI INDIA,DELHI UDS,CHICAGO INDIA,PUNE i want data in target like below: INDIA,MUMBAI1 INDIA,DELHI2 INDIA,PUNE3 USA,NEWYORK1 USA,CHICAGO2

0 Answers  


What is a datastage job?

0 Answers  


Could anyone give brief explanation bout datastage admin

0 Answers  


Categories