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.
Issue with a DIM load SCD 2
Moderators: chulett, rschirm, roy
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.
Hopefully something there helps.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
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,
- 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,