Surrogate Key Generator Stage In Datastage
- Processing Stages In Datastage
- Datastage Stage Types
- Surrogate Key Generator In Datastage
- Lookup Stage In Datastage Example
- Filter Stage In Datastage
- Surrogate Key Generator Datastage
Jun 14, 2011 Generate ROW NUMBER (or row id) Column in a DataStage job Posted on June 14, 2011 by Ivan Georgiev Sometimes in DataStage it is necessary that you assign consecutive numbers (e.g. 1, 2, 3, ) to rows. Input value: rm /tmp / Surrogatekey file name This will ensure the Datastage to create and remove the Surrogate key file everytime you run the job Now coming to the Transformer NextSurrogateKey function mapped against your target field which is supposed to generate the SK sequence will retrieve the value from the file. Jun 04, 2014 Surrogate Key Generator - Generate Surrogate Key for Data In this post, We will see how to generate surrogate key for data, where we have to use surrogate key stage. Surrogate Key Generator stage. The Surrogate Key Generator stage is a processing stage that generates surrogate key columns and maintains the key source. A surrogate key is a unique primary key that is not derived from the data that it represents, therefore changes to the data will not change the primary key. The right answer is that with SQL Server we don't really need a Sequence Generator or State File or a database sequence, we just need to add to the table the IDENTITY column which will auto increment for every record inserted. And to use that with the SCD stage just let the Surrogate Key option blank.
Answers were Sorted based on User's Feedback
Answer / venkatesh.m
by using the transformer we can do it.To generate seqnum
there is a formula by using the system variables
ie
[@partation num + (@inrow num -1) * @num partation
Answer / murali
yes ur right but we have another way to generate s key by
using transformer .in transformer we have a surrogate key tab
click the skey tab in that we hav state file and db sequence
these r used for generate and hold the s key value
Processing Stages In Datastage
Answer / sudhir
Surrogatekey is nothing but a unique number to identify the
record in datamart. So just use a counter in StageVariable
of Transformer. Keep incrementing the counter by one for
every new inserts. This would form a surrogatekey.
Datastage Stage Types

Answer / sreenu
Using the Routine
KeyMgtGetNextVal
KeyMgtGetNextValConn
Surrogate Key Generator In Datastage
Answer / nish
sudhir your answer is wrong. The last of us pc key generator skidrow. just incrementing will not work in a multinode config.
the answers that utilize the @partition num variable are correct

Lookup Stage In Datastage Example
Answer / snehasis
Filter Stage In Datastage
By using system variable in transformer stage
like 1) create a stage var(SVK).
2) go to stage var. property type in the initial value tab as @partionnum - @numpartion+1
3) in the stage var. derivation type SVK+@numpartition