Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.
Moderators: chulett , rschirm , roy
pandeesh
Premium Member
Posts: 1399 Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU
Post
by pandeesh » Sat Jul 09, 2011 1:53 pm
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
pandeeswaran
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Sat Jul 09, 2011 2:38 pm
I'm guessing there's more to this than meets the eye, but...
30 output links from the transformer, link collector, target
-craig
"You can never have too many knives" -- Logan Nine Fingers
zulfi123786
Premium Member
Posts: 730 Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore
Post
by zulfi123786 » Sun Jul 10, 2011 6:10 am
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.
- Zulfi
pandeesh
Premium Member
Posts: 1399 Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU
Post
by pandeesh » Mon Jul 11, 2011 7:31 am
chulett wrote: ..
30 output links from the transformer, link collector, target
Craig,
transformer to Linkcollector, Active to Active Error right?
Thanks
pandeeswaran
pandeesh
Premium Member
Posts: 1399 Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU
Post
by pandeesh » Mon Jul 11, 2011 7:33 am
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
pandeeswaran
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Mon Jul 11, 2011 7:34 am
Are you asking or telling?
And I gave you a Server answer since that's how you marked your post.
-craig
"You can never have too many knives" -- Logan Nine Fingers
pandeesh
Premium Member
Posts: 1399 Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU
Post
by pandeesh » Mon Jul 11, 2011 7:42 am
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
pandeeswaran
battaliou
Participant
Posts: 155 Joined: Mon Feb 24, 2003 7:28 am
Location: London
Contact:
Post
by battaliou » Mon Jul 11, 2011 8:34 am
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.
3NF: Every non-key attribute must provide a fact about the key, the whole key, and nothing but the key. So help me Codd.
Ravi.K
Participant
Posts: 209 Joined: Sat Nov 20, 2010 11:33 pm
Location: Bangalore
Post
by Ravi.K » Mon Jul 11, 2011 9:04 am
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.
Cheers
Ravi K
arunkumarmm
Participant
Posts: 246 Joined: Mon Jun 30, 2008 3:22 am
Location: New York
Contact:
Post
by arunkumarmm » Thu Jul 14, 2011 1:38 pm
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.
Arun