Menu
Answers were Sorted based on User's Feedback
- Surrogate Key Generator Stage In Datastage 4
- Processing Stages In Datastage
- Surrogate Key Generator Stage In Datastage 12
The state file is a key source for the surrogate key generator stage, the state file persists data that contains the next value and properties for creation of keys between job runs utilising this key source. It is a flat file in the file system. The Surrogate Key Generator stage is a processing stage that generates surrogate key columns and maintains the key source. Some natural keys are totally manually generated. IBM DataStage Surrogate key generator state file.
How to generate surrogate key without using surrogate key stage?..
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
there is a formula by using the system variables
ie
[@partation num + (@inrow num -1) * @num partation
How to generate surrogate key without using surrogate key stage?..
Answer / murali
Surrogate Key Generator Stage In Datastage 4
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
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
How to generate surrogate key without using surrogate key stage?..
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.
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.
![Stages Stages](/uploads/1/2/6/0/126088143/143997442.jpg)
How to generate surrogate key without using surrogate key stage?..
![Datastage Datastage](/uploads/1/2/6/0/126088143/930110590.jpg)
Answer / sreenu
Using the Routine
KeyMgtGetNextVal
KeyMgtGetNextValConn
KeyMgtGetNextVal
KeyMgtGetNextValConn
How to generate surrogate key without using surrogate key stage?..
Answer / nish
sudhir your answer is wrong. just incrementing will not work in a multinode config.
the answers that utilize the @partition num variable are correct
the answers that utilize the @partition num variable are correct
How to generate surrogate key without using surrogate key stage?..
Answer / snehasis
Processing Stages 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
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