Generating Surrogate Key in one Transformer

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
anudeepdasari001
Participant
Posts: 58
Joined: Mon Dec 14, 2015 3:16 pm
Location: Arizona

Generating Surrogate Key in one Transformer

Post 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,
anudpETL
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rkashyap
Premium Member
Premium Member
Posts: 532
Joined: Fri Dec 02, 2011 12:02 pm
Location: Richmond VA

Post 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.
Post Reply