Page 1 of 1

replicating same record many times.

Posted: Sat Jul 09, 2011 1:53 pm
by pandeesh
i have the source file with one record which has id,name columns:

1,abs.

In the target file,i need the same record 30 times.

how to achieve this?

thanks

Posted: Sat Jul 09, 2011 2:38 pm
by chulett
I'm guessing there's more to this than meets the eye, but...

30 output links from the transformer, link collector, target

Posted: Sun Jul 10, 2011 6:10 am
by zulfi123786
if you are okay with doing this at Unix, a while loop with hardly 10 lines will do the needful.
If you want to get it done at datastage level then use sequencer with loop stages and a job betwee them which reads your seq file and appends it to another.

Posted: Mon Jul 11, 2011 7:31 am
by pandeesh
chulett wrote:..

30 output links from the transformer, link collector, target
Craig,

transformer to Linkcollector, Active to Active Error right?

Thanks

Posted: Mon Jul 11, 2011 7:33 am
by pandeesh
i think we can achieve by using copy stage.From copy stage we can take 30 output links and redirect to funnel stage and the target

Posted: Mon Jul 11, 2011 7:34 am
by chulett
Are you asking or telling?

And I gave you a Server answer since that's how you marked your post.

Posted: Mon Jul 11, 2011 7:42 am
by pandeesh
In server job, i have tried the below design

Code: Select all


seqfile-->Transformer-----------
                            ---------------Link collector------->target_file
                            -------------


But that leads to compilation error.

Code: Select all

link collector stage does not support in_process active-to active input or outputs

Posted: Mon Jul 11, 2011 8:34 am
by battaliou
Have a look at the Row Generator stage. This will allow you to generate as much data as you like and you can modify it in a transformer to lookup against your flatfile data.

Posted: Mon Jul 11, 2011 9:04 am
by Ravi.K
pandeesh wrote:
chulett wrote:..

30 output links from the transformer, link collector, target
Craig,

transformer to Linkcollector, Active to Active Error right?

Thanks
Look at IPC Stage in between.

Posted: Thu Jul 14, 2011 1:38 pm
by arunkumarmm
Create your target file normally, like one output for an input. In the next step (Same or different job) read the whole record as one column, create a target file with 30 columns as pass the source value to all the 30 columns and for the first 29 columns append the Line terminator as required.