Generation Of Surrogate Keys

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
nivas
Participant
Posts: 117
Joined: Sun Mar 21, 2004 4:40 pm

Generation Of Surrogate Keys

Post by nivas »

We are about to start development in Parallel Jobs. I am putting this question in curiosity.How do we Generate Surrogate Keys in Parallel Jobs? Is there any difference from the same in Server jobs.
Any suggestions are appreciated.

thanks

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

Post by ray.wurlod »

There's one very big difference from server jobs - you have parallel data streams!

Use a Column Generator stage.

1.Open properties for the Column Generator stage
2.Click on the Columns tab
3.Double-click on the positional number of the serial column you are generating.
4.Click on Generator in the Properties field.
5.Choose Type in the Available properties to add.
6.Choose Initial Value=part.
7.Choose Increment=partcount.

Or, if your target database has an auto-incrementing capability (a sequence or a serial data type), use that during the load phase.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nivas
Participant
Posts: 117
Joined: Sun Mar 21, 2004 4:40 pm

Generation Of Surrogate Keys in Parallel Jobs

Post by nivas »

Ray

Thanks for your suggestions

Nivas
gh_amitava
Participant
Posts: 75
Joined: Tue May 13, 2003 4:14 am
Location: California
Contact:

Post by gh_amitava »

Hi,

You can use the Surrogate Key generator stage available in version 7.0.1

Regards
Amitava
Post Reply