How to generate surrogate key without using surrogate key stage?

Answers were Sorted based on User's Feedback



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

Is This Answer Correct ?    13 Yes 0 No

How to generate surrogate key without using surrogate key stage?..

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

Is This Answer Correct ?    5 Yes 0 No

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.

Is This Answer Correct ?    4 Yes 2 No

How to generate surrogate key without using surrogate key stage?..

Answer / sreenu

Using the Routine
KeyMgtGetNextVal
KeyMgtGetNextValConn

Is This Answer Correct ?    0 Yes 0 No

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

Is This Answer Correct ?    0 Yes 0 No

How to generate surrogate key without using surrogate key stage?..

Answer / snehasis

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
 

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More Data Stage Interview Questions

How can i approach to write datastage 7.5 Certification? and how much they will charge for examination .What exactly should i do? Can anyone guide me plz?

2 Answers  


EXPLAIN SCD

0 Answers   CTS,


How to enter a log in auditing table whenever a job get finished?

2 Answers   L&T,


deptno wise to find max and min,and sum of rows and in target to company wise maximum

1 Answers   IBM, TCS,


where we use config file as parameter ?

1 Answers   IBM,


HOW CAN YOU DO SCD2 IN DATA STAGE USING SEQUENTIAL FILES?

1 Answers   HCL, IBM, Infosys,


A flat file contains 200 records. I want to load first 50 records at first time running the job, second 50 records at second time running and so on, how u can develop this job?

1 Answers   TCS,


what is meta data? Explain? Where it is used?

9 Answers  


Highlight the main features of datastage?

0 Answers  


How to convert alpha Numeric values to alpha using functions?

1 Answers   CTS,


explain about citrix scheduling tool in datastage

0 Answers   HSBC,


how many stages are there in Datastage... Please clarify mee??

3 Answers  


Categories