Page 1 of 1

SKG stage related question

Posted: Mon Nov 28, 2011 10:25 am
by devsonali
Hello Gurus

I have a requirement
I have multiple columns
Column1 Column2
A A1
A A2
A A3
B B1
B B2
so on
I was trying to get key columns for both as follows

Column1 Column2 KeyforColumn1 KeyforColumn2
A A1 1 1
A A2 1 2
A A3 1 3
B B1 2 1
B B2 2 2

So on

Can you please tell me how to use SKG stage to achieve this ?

Posted: Mon Nov 28, 2011 11:37 pm
by jwiles
It would be difficult to get the results indicated in your example with SKG in a single job due to the fact you are reusing key values for column 2. SKG is all about generating unique values.

Use NextSurrogateKey() function in a transformer for each input column, rather than the SKG stage, as you can control when a new SK is created for a column--when the column value changes. See the documentation in the Parallel Job Developer's Guide for information on how to use the function and set the transformer's Surrogate Key options.

Regards,