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

Have you have ever worked in unix environment and why it is useful in datastage?

0 Answers  


How can we improve performance of data stage jobs?

0 Answers  


What are the functionalities of link collector?

0 Answers  


which is the most complex job in your career? Please tell me answer?

2 Answers   IBM, Wipro,


i 10 jobs first two jobs are runing in 2nodes,next 2 jobs are running in 4 nodes, next 4 jobs are running in 6 nodes and the remaining jobs are running on 10 nodes. how to change the node configuration?

2 Answers  






Source Like department_no, employee_name ---------------------------- 20, R 10, A 10, D 20, P 10, B 10, C 20, Q 20, S and Output should be like this department_no, employee_list -------------------------------- 10, A 10, A,B 10, A,B,C 10, A,B,C,D 20, A,B,C,D,P 20, A,B,C,D,P,Q 20, A,B,C,D,P,Q,R 20, A,B,C,D,P,Q,R,S

3 Answers  


What is the difference between informatica and datastage?

0 Answers  


what is the difference between lookup stage reject link and merge stage reject link in datastage Parallel jobs? interm of output in Merge Reject link and Look Up Reject link ?

4 Answers   HCL,


How to read the length of word in unix?

0 Answers   CTS,


How to manage date conversion in Datastage?

0 Answers  


i have 4 jobs i want run 1job should run on 1node and 2job runon 2node and.... how to make it possible?

1 Answers  


how to validate the jobs

2 Answers   IBM,


Categories