Additions without Transformer

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
alkanti
Participant
Posts: 17
Joined: Thu Jun 08, 2006 10:18 am

Additions without Transformer

Post by alkanti »

Hi, Is there any way to increment an integer column by 1 without using transformer stage in Parallel Edition.

Thanks
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Yes. But no method that I can think of is easy to implement and would be silly to use - i.e. putting in a dummy column with a fixed value of 1 and then using some other stage such as a modify to perform the action.
alkanti
Participant
Posts: 17
Joined: Thu Jun 08, 2006 10:18 am

Post by alkanti »

Can the modify stage be used to concatenate a constant value to a varchar column? or the constant has to be defined as a separate column and then do the concatenation.

ArndW wrote:Yes. But no method that I can think of is easy to implement and would be silly to use - i.e. putting in a dummy column with a fixed value of 1 and then using some other stage such as a modify to perfo ...
uegodawa
Participant
Posts: 71
Joined: Thu Apr 27, 2006 12:46 pm

Post by uegodawa »

You can use Surrogate Key stage to generate values by specify the initial value for the key generation. It defaults to 0. You can also specify a job parameter, so the start value can be supplied at run time.

If you want to concatenate the generated value with constant, you can use modify stage. In modify stage you just need to give the derivation, no need to define extra column. For Example Input Column : S_KEY ; Output Column New_S_KEY then specification for New_S_KEY column would be New_S_KEY := 'Constant' : S_KEY.
Thanks,
Upul
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

alkanti wrote:Can the modify stage be used to concatenate a constant value to a varchar column? or the constant has to be defined as a separate column and then do the concatenation.
No. Modify stage functions are single-argument functions. That rules out arithmetic operations.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply