Page 1 of 1

Duplicating record n Times

Posted: Mon Jan 27, 2014 11:01 am
by vamsi.4a6
I have a table consists of 2 columns and required o/p is input should be duplicated n times.
n may be 2,3,5


Ex-if n is 2 and no of records in i/p is 3.required o/p is 6 rows(3*2)

I can acheive using looping,copy+funnel stage but want to know is there any single stage in datastage which can get the required output

Posted: Mon Jan 27, 2014 12:44 pm
by chulett
Transformer with looping would be your 'single stage'.

Posted: Mon Jan 27, 2014 5:02 pm
by ray.wurlod
What Craig said is your best choice. Make n a job parameter, and compare it to @ITERATION as your loop continuation condition.

Posted: Tue Jan 28, 2014 6:18 am
by vamsi.4a6
thanks for quick response and apart from transformer with looping is it possible to achieve the same functionality with single stage?

Posted: Tue Jan 28, 2014 8:44 am
by chulett
No.

Well... unless you count writing a BuildOp or some other external solution as a 'single stage' solution.