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 many types of sorting the data in data stage?
can we use sequential file as a lookup
what is the diff between sequential file and fileset stages?
source has 2 fields like COMPANY LOCATION IBM HYD TCS BAN IBM CHE HCL HYD TCS CHE IBM BAN HCL BAN HCL CHE LIKE THIS....... AND I WILL GET THE OUTPUT LIKE THIS.... Company loc count TCS HYD 3 BAN CHE IBM HYD 3 BAN CHE HCL HYD 3 BAN CHE PLZ SEND ME ANSWER FOR THIS QUESTION..........
which is more expensive hash or modulus partitioning? when do you use modulus partitioning?
What are the some differences between 7.x and 8.x version of datastage?
whats difference between ls -ltr and ls -lrt?
What is the difference between validated and compiled in the datastage?
1.what is repartionoing technique? 2.what deliverables transferred to client using datastage? 3.how to write loop statements using nested loop sequence?
Describe the main features of datastage?
souce file having the columns like name company krish IBM pooja TCS nandini WIPRO krish IBM pooja TCS if first row will be repeat i want the result like this name company count krish IBM 1 pooja TCS 1 nandini WIPRO 1 krish IBM 2 pooja TCS 2
can we half project in parallel jobs and half project in server jobs?