How to generate surrogate key without using surrogate key stage?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
Answer / sreenu
Using the Routine
KeyMgtGetNextVal
KeyMgtGetNextValConn
Is This Answer Correct ? | 0 Yes | 0 No |
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 |
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 |
How do you register plug-ins?
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.
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?
What is a quality stage in datastage tool?
how to retrive the max(sal),deptno,empno in datastage?
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....
can any 1 put a difference between datastage 7.5 and 8.0 all concepts plz r mail 2 me anu4u09@gmail.com
Differentiate between data file and descriptor file?
What are the functionalities of link collector?
What are the main features of datastage?
How can we achive parallelism
Hi This is Vijay, How can your remove the duplicates in sequential File?
15 Answers HCL, Scope International,