Basic help

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
sachin518
Participant
Posts: 4
Joined: Fri Jul 13, 2012 8:15 pm

Basic help

Post by sachin518 »

give me the logic to generating sequence number without using surrogate key generator.
reddy
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I'm not sure exactly what you want, but in a transform stage if you want to generate a unique number regardless of how many partitions you have the formula is:

Code: Select all

((@INROWNUM-1)*@NUMPARTITIONS)+(@PARTITIONNUM+1)
Note that this will start at 1 each run.
bhasds
Participant
Posts: 79
Joined: Thu May 27, 2010 1:49 am

generating sequence number

Post by bhasds »

Hi Sachin518,

Sequence Number can be generated in form of row number in Sequential file Stage as well.

sequential file stage--->output--->properties-->options-->RowNumberColumn.
Post Reply