Duplicating record n Times

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

Duplicating record n Times

Post 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
Thanks and Regards
Vamsi krishna.v
http://datastage-vamsi.blogspot.in/
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Transformer with looping would be your 'single stage'.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

Post by vamsi.4a6 »

thanks for quick response and apart from transformer with looping is it possible to achieve the same functionality with single stage?
Thanks and Regards
Vamsi krishna.v
http://datastage-vamsi.blogspot.in/
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No.

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

"You can never have too many knives" -- Logan Nine Fingers
Post Reply