Page 1 of 1
Record duplicate
Posted: Wed Feb 21, 2007 11:45 am
by mouthou
Hello everyone,
Is there an option in a job to duplicate the records from the source file. I need to create 3 duplicated records from a single record. Any help would be appreciated.
Version: Server
Os: Windows
Thanks,
Re: Record duplicate
Posted: Wed Feb 21, 2007 11:50 am
by asitagrawal
How many fields are there in the input ?
Posted: Wed Feb 21, 2007 12:09 pm
by kcbland
3 output links from a Transformer going into a Link Collector/Hashed file/3 separate Sequential files/etc.
Posted: Wed Feb 21, 2007 12:35 pm
by mouthou
[quote="kcbland"]3 output links from a Transformer going into a Link Collector/Hashed file/3 separate Sequential files/etc. ...[/quote]
Is there a better option than having 3 sequential files. I need to have all those 3 records in a single sequential file.
Re: Record duplicate
Posted: Wed Feb 21, 2007 12:36 pm
by mouthou
[quote="asitagrawal"]How many fields are there in the input ?[/quote]
I have 18 fields. Are you talking about @VM?
Posted: Wed Feb 21, 2007 1:27 pm
by DSguru2B
Code: Select all
---->
your source --->xfm ----> LinkCollector ---->Single Target.
---->
Posted: Wed Feb 21, 2007 2:33 pm
by mouthou
Thanks. It worked. I didnt realise that there is a link collector in Server edition. It is same as what kcbland suggested.
Posted: Wed Feb 21, 2007 2:35 pm
by DSguru2B
I just gave a visual view of Ken's suggestion
Posted: Thu Feb 22, 2007 11:37 am
by urshit_1983
Another soln
you can write a before job subroutine script :
{ rm -f infile && awk '{ for (i=0;i<3; i++) { print $0 } }' > infile; } < infile