Page 1 of 1

Generating Surrogate Key in one Transformer

Posted: Wed Feb 17, 2016 9:38 am
by anudeepdasari001
I have two surrogate key columns Global_order_id(parent table) and Global_order_dtl(child table) i need to load data simultaneously into this tables,,can i generate the surrogate key for both columns in one transformer,,

Right now i am using two transformers,

Posted: Wed Feb 17, 2016 1:03 pm
by Mike
You can use NextSurrogateKey() as many times as you'd like in a single transformer.

But you can only define a single surrogate key state file per transformer.

Mike

Posted: Wed Feb 17, 2016 4:26 pm
by ray.wurlod
What Mike said.

There's no great issue using two Transformers. Chances are that they'll be combined into the one process anyway (operator combination).

Posted: Sun Feb 21, 2016 9:24 pm
by rkashyap
If multiple surrogate key values are being sourced from database sequences, then combining the NEXTVAL calls in a single SELECT statement executed thru sparse Lookup (using dummy key) may be more efficient/faster than leveraging transformer's capabilities.