Datastage scenario

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
aschindler
Participant
Posts: 30
Joined: Wed May 15, 2013 1:22 am
Location: Bangalore

Datastage scenario

Post by aschindler »

Hi Team,

I have below requirement,please suggest approach to get desired output
input:
2
3
4
1
output:
2
2
3
3
3
4
4
4
4
1

Output should get the multiple values based on the value of input field.
Cheers,
Schindler
RPhani
Participant
Posts: 32
Joined: Sun Aug 26, 2012 7:03 am
Location: Hyd

Post by RPhani »

Hi,

Use Transformer Looping concept.

---------------------
RPhani
aschindler
Participant
Posts: 30
Joined: Wed May 15, 2013 1:22 am
Location: Bangalore

Post by aschindler »

Hi Phani,

I have tried this looping but could not achieve the desired result. Could you please explain me in detail what needs to be Done.

Thanks in Advance
Cheers,
Schindler
RPhani
Participant
Posts: 32
Joined: Sun Aug 26, 2012 7:03 am
Location: Hyd

Post by RPhani »

Hi,

1)Your DS version ?

--------------------------
RPhani
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Could you please explain in detail to us what exactly it was that you tried? And what result you did achieve? We're here to help, not just hand over work. Have you gone through the help documentation on the Transformer Looping concept and the functions that support it? Lots of information there!
-craig

"You can never have too many knives" -- Logan Nine Fingers
atul9806
Participant
Posts: 96
Joined: Tue Mar 06, 2012 6:12 am
Location: Pune
Contact:

Post by atul9806 »

For this scenario, try this code in transformer:

Code: Select all

Loop Condition :  LoopVar<=input
Loop Variables :
LoopVar + 1 = LoopVar
input = LoopVar1

Output :
LoopVar1 = output

Hoping this will work
~Atul Singh
<a href=http://www.datagenx.net>DataGenX</a> | <a href=https://www.linkedin.com/in/atulsinghds>LinkedIn</a>
Post Reply