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

Describe routines in datastage? Enlist various types of routines.

0 Answers  


how to connect source to db?generally what r stages u used? how to find the data is having delimiter format?

0 Answers   Wipro,


how can u connect the client system directly at any time?

1 Answers   IBM,


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  


How will you move hashed file from one location to another location?

0 Answers   NTT Data,






What are the environmental settings for data stage,while working on parellel jobs?

2 Answers   Satyam,


What is datastage?

0 Answers  


1)What is configuration your file structure 2)I have two databases both are Oracle while loading data from source to target the job takes 30 min but I want to load less time how?

1 Answers   Hexaware,


table a contains 5 columns and table b contains 5 columns how can i get 10 columns at target?

9 Answers  


parallel jobs run on cluster machines. server jobs run on smp and mpp. What do mean by cluster mechines and SMP and MPP..?

3 Answers  


if we using two sources having same meta data and how to check the data in two sources is same or not? and if the data is not same i want to abort the job ?how we can do this?

1 Answers   IBM,


Hi guys, Please design a job for dis requirement with derivation(solution). my source table like dis. emp_no qualification 1 a 1 c 2 a 3 c 3 b To loaded to target like dis emp_no qualification 1 b 2 b 2 c 3 a my requirement is every employer have three qualifications i.e a,b and c. what qualification missed in source table that will be move to target systems. Hope u got it the requirement. Right Thanks.

0 Answers  


Categories