Page 1 of 1

Output 10 records for 1 record

Posted: Mon Jun 06, 2011 9:59 am
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?

Posted: Mon Jun 06, 2011 10:32 am
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.

Posted: Mon Jun 06, 2011 11:27 am
by asorrell
If you are running 8.5 you can use the Loop in the transformer to output 10 copies of each incoming row.

Posted: Mon Jun 06, 2011 4:52 pm
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.

Posted: Mon Jun 06, 2011 9:07 pm
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.