Output 10 records for 1 record

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
prajesh
Participant
Posts: 7
Joined: Sun Apr 24, 2011 4:52 am

Output 10 records for 1 record

Post by prajesh »

i have 1 record in source but i want 10 records in target in DataStage. how get
data.

tell me if you know any logic or what is stage for using for this job?
prajesh
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

First, let's get you in the correct forum - the one this started in was for discussions of FAQ topics (hence the name) not for problem solving. This one is for solving problems with PX jobs, an assumption I've made along with your version and O/S. Please let us know if any of the choices I've made are wrong.
-craig

"You can never have too many knives" -- Logan Nine Fingers
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

If you are running 8.5 you can use the Loop in the transformer to output 10 copies of each incoming row.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
jcthornton
Premium Member
Premium Member
Posts: 79
Joined: Thu Mar 22, 2007 4:58 pm
Location: USA

Post by jcthornton »

What do you need the 10 records for? If it is just a straight copy, use the Copy stage.

I'm guessing it is more complex than that. If you need just part of the inbound record for each of the outbound, Copy is still a good choice.

If you need to pivot the results or perform some sort of derivation to get your ten records, use a Transformer with 10 [or more] outputs - with or without constraints.

If the need is more complex, give us more details on the problem and more suggestions will come in.
Jack Thornton
----------------
Spectacular achievement is always preceded by spectacular preparation - Robert H. Schuller
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If it looks like an interview question, sounds like an interview question and quacks like an interview question...

Not the first time this one has been asked here, either.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply