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 do you register plug-ins?

0 Answers  


how can we validate the flat files using the date in the header and number of records in the flat file? Using both conditions at a time.

0 Answers   JPMorgan Chase,


1. How many People are part of your Team? 2. Explain how you create jobs or flow of project? 3. Join Stage vs Lookup vs Merge Stage 4. Summation scenario based question - How you find sum of salary for a specific employee (Explain stages and flow of job)? 5. Explain Remove duplicates stage ? Can you do sort in this stage? 6. SQL Questions - Joins - Types, Difference between Join and Union 7. Unix Questions - How you run the Job, How you list all jobs in project 8. Explain Environmental Variables? 9. SQL Scenario - If you have 3 Identical record in a Table, Ex: 1, Ram, Xyz; 1, Ram, Xyz; 1, Ram, Xyz; Delete only 2 of the records and keep only 1 using the Delete query. How you will you do this?

1 Answers  


What is a quality stage in datastage tool?

0 Answers  


how to retrive the max(sal),deptno,empno in datastage?

13 Answers   Polaris,






in one scenario source flat file like Fileld1 00122001550056200568 00256002360014500896 00123004560078900258 00147004560025800256 divide each 5 numbers as one column i.e here i need field1 field2 field3 field4 00122 00155 00562 00568 00256 00236 00145 00896 00123 00456 00789 00258 00147 00456 00258 00256 plz help me....

4 Answers  


can any 1 put a difference between datastage 7.5 and 8.0 all concepts plz r mail 2 me anu4u09@gmail.com

4 Answers   IBM,


Differentiate between data file and descriptor file?

0 Answers  


What are the functionalities of link collector?

0 Answers  


What are the main features of datastage?

0 Answers  


How can we achive parallelism

1 Answers   CTS,


Hi This is Vijay, How can your remove the duplicates in sequential File?

15 Answers   HCL, Scope International,


Categories