SCD stage implementation

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
Pavani_Vithala
Participant
Posts: 7
Joined: Mon Mar 05, 2007 3:25 am

SCD stage implementation

Post by Pavani_Vithala »

Hello Every body,
I am trying to implement SCD stage in parallel. Can any one tell me what is the use of state file? I am creating Dim tables in DB2. There is an option to include a surrogate key like create one column which will start with value 1 and keeps incrementing 1 for each record. Then why do I need a state file which just stores the max value of that column? Also where is the option to generate the key if I have to generate using DS jobs? Because unlike in DS 7.x, there is no Surogate generator stage with fields for initial value and cycle value etc.,

Request any one to tell what are the steps to generate it if my dim tables are in DB2? Why should I have state file creation and updation job at all?

Rgds,
Pavani
Pavani Vithala
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You create the state file (assuming that's the key generate mechanism you propose to use) with a job that has the Surrogate Key Generator stage with no links.

You initialize the state file in a job that has the Surrogate Key Generator stage with an input link, that presumably receives the result of a query such as SELECT MAX(SK) + 1 FROM DimTable;

Or you can have the database generate the key values for you. This is not as fast/efficient as using a local state file.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply