I have a input as:

Col
1
1
2
2
3

I want 3 output as:

Output1:

1
1

Output2:

2
2

Output3:

3

i.e. same duplicates should be in one target, other duplicate values should be in another target and so on.. Pls help

Answers were Sorted based on User's Feedback



I have a input as: Col 1 1 2 2 3 I want 3 output as: Output1: 1 1 Output2: 2..

Answer / ankur

Thats a good question... but unfortunately I dont know the ans.. Datastage gurus- can anyone help this guy and myself to know this question's ans.. Appreciate your feedback please!!

Is This Answer Correct ?    0 Yes 0 No

I have a input as: Col 1 1 2 2 3 I want 3 output as: Output1: 1 1 Output2: 2..

Answer / ankit kansal

Hi, if you know the number of duplicates coming your from source then it's easy to move the duplicates to the defined target using router transformation easily,
But if you do not know the number of duplicates then first you must sort the data on the value of duplicate column and then using Transaction Component as available in informatica you can create n no of targets depending upon the values encountered.

http://deepinopensource.blogspot.in/

Is This Answer Correct ?    1 Yes 1 No

I have a input as: Col 1 1 2 2 3 I want 3 output as: Output1: 1 1 Output2: 2..

Answer / vaibhav

hello Ankit,

I need the ans in datastage..how this could be implemented in datastage?

Is This Answer Correct ?    0 Yes 0 No

I have a input as: Col 1 1 2 2 3 I want 3 output as: Output1: 1 1 Output2: 2..

Answer / kiran kumar

hi
put the hash partition in active stage then
make three node configuration then u got the output

Is This Answer Correct ?    2 Yes 2 No

I have a input as: Col 1 1 2 2 3 I want 3 output as: Output1: 1 1 Output2: 2..

Answer / suneelbabu.etl

can u mention some more input records as well output

Is This Answer Correct ?    0 Yes 0 No

I have a input as: Col 1 1 2 2 3 I want 3 output as: Output1: 1 1 Output2: 2..

Answer / sher

something like below should work...

Job#1
Read in transformer to add a new column sequence the value of sequence will be initially 1 and increment when key changes…
so output(A) will look like…
1 1
1 1
2 2
2 2
3 3
4 4
B 5
under job sequence, use a job activity to read(A) use tail -1 and | cut to read 2nd column. we get 5..
Now, use start loop activity and end look activity stage in job sequence to create a loop from 1 to jobactivity.output incrementing by 1..
The look will now run 5 times.. inside the loop, call a job and pass the value i.e 1,2,3,4,5 each time it runs.
Inside the called job, read the input file(A) pass to transformer and then use constraint to write only records where 2nd column = variable passed and drop column 2..
Output of transformer.
1st loop output
1
1
2nd loop output
2
2
and so on...
when writing the file, use the passed variable in file name, so file name is distinct

Is This Answer Correct ?    0 Yes 0 No

I have a input as: Col 1 1 2 2 3 I want 3 output as: Output1: 1 1 Output2: 2..

Answer / narayan

just add the mod function like this =MOD(inputcol|3) and then load into different targets

Is This Answer Correct ?    0 Yes 0 No

I have a input as: Col 1 1 2 2 3 I want 3 output as: Output1: 1 1 Output2: 2..

Answer / sivakeshava

hi friends by seeing the source we need 3 targets....which id duplicates 1,1 is one target, and 2,2 is 2nd target and 3 is another target
Seqfile------------ >copy -------------- lookup(innerjoin) ------------- filter

Aggregator---------------- > filter
(count) where clause

copy to aggregate then filter to lookup then will give 3 targets

Is This Answer Correct ?    0 Yes 0 No

I have a input as: Col 1 1 2 2 3 I want 3 output as: Output1: 1 1 Output2: 2..

Answer / vaibhav

Actually it is like:
I want as many target links as much u have types of duplicates in my input file.. Pls help guys..

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Data Stage Interview Questions

How do you run datastage job from the command line?

0 Answers  


How to delete the data in dataset?types of deleting the data in dataset?

4 Answers   HSBC,


What is the difference between Link collector and Funnel Stages?

1 Answers  


Hi friends, I am new to datastage, i have one query in datastage any one you please give reply to my post. I have a workbook (excel sheet) named as eg: xxxx, in that i have two tables emp(eid, ename, salary, deptno) and dep(deptno, name, state). in my source i have ODBC enterprise stage read the emp table and dept table join the two table and write the dept no 10(eid,ename,salary,name,state) values in target(). Thanks, Badari

0 Answers  


what is a force compile

2 Answers   Cap Gemini, IBM,






what is flow of project?

0 Answers   HSBC, IBM,


What is the difference between Datastage 7.5 and 7.0?

0 Answers  


i have a job with 3 possibiliies finish with ststus ok abbort warning how do you handle these 3 in job sequence? explain the situation where you have appiled scd in your project? chandu

0 Answers  


What is the difference between in process and inter process?

0 Answers  


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  


Can you explain tagbatch restructure operator?

0 Answers  


I am running a job with 1000 records.. If the job gots aborted after loading 400 records into target... In this case i want to load the records in the target with 401 record... How will we do it??? This scenario is not for sequence job it's only in the job Ex: Seq file--> Trans--> Dataset..

9 Answers   Cognizant, IBM, TCS, Virtusa,


Categories