Issue with a DIM load SCD 2

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
vskr72
Premium Member
Premium Member
Posts: 128
Joined: Wed Apr 28, 2004 9:36 pm

Issue with a DIM load SCD 2

Post by vskr72 »

I am trying to build a individual dimension and I am using a SCD stage. This stage has 2 inputs and 2 outputs
- Staging data input
- DIM lkp input
- DIM_Insert Output
- DIM_Update output

I get the following error with a SK function

"The function NextSurrogatekey() cannot be called from column 'INS_LNK.SK' because it is not a surrogate key column!"

Can any one help me in this.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Have you been through the docs on the SCD stage? There's a chapter for it in the Parallel Job Developer Guide pdf and a section in that chapter specific to 'Surrogate keys in a Slowly Changing Dimension stage'. It should explain how to tell the stage what your Surrogate Key is, either through the Purpose Code on the lookup, or if you are generating it instead like it sounds you are, on the Surrogate Key tab.

Hopefully something there helps.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Before this function can be called in the SCD stage, the column whose derivation it is must have its purpose assigned as "Surrogate Key". My guess is that you have missed this step.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vskr72
Premium Member
Premium Member
Posts: 128
Joined: Wed Apr 28, 2004 9:36 pm

Post by vskr72 »

That setting is already defined. Not sure where the issue is.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Then you should probably involve your official support provider, perhaps there's a fixpack or patch you are missing.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vskr72
Premium Member
Premium Member
Posts: 128
Joined: Wed Apr 28, 2004 9:36 pm

Post by vskr72 »

I modified the job and implemented SCD2 in the old fashion way not using the SCD stage provided datastage. Below is the functionility:
- if a new record is found it inserts
- if an existing record is found, it end dates the existing record in the DIM and
- and open a new record .

So, the job has 2 inserts and 1 update Oracle stage. The issue I am facing with this is if I just have 1 Insert and 1 update and send the other insert to a Peek or file, it runs OK. But, if I add all three Oracle stages in the TGT, then it hangs and doesnt progress.

For now, I am doing the 3rd insert into a flat file and then dumping it to the table in a different job.

Is there something that I am missing. Thanks,
Post Reply