How to implement the SCD type 3 in Datastage 7.0 ...

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
kumarreddy
Participant
Posts: 4
Joined: Thu Apr 08, 2004 7:28 am

How to implement the SCD type 3 in Datastage 7.0 ...

Post by kumarreddy »

Hi all....
How to implement the slowly changing dimension type 3 in Data stage 7.x...
if possible give me one example....that is great help for me...
Thanks
Kumar G
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

1. Read the source row.
2. Transform the souce row.
3. Reference the row in the target table (either prestage to hash or do OCI lookup)
4. Update all non-SCD type 3 columns if they are different.
5. Compare SCD type 3 columns against their current value. If different, then move version 3 value to version 4 value, version 2 value to version 3 value, current value to version 2, and new value into the current column. Repeat this for all SCD type 3 columns.
6. If any columns were updated, load the row into the target.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Which is it, 6x or 7x? :wink:

Do you know how to update an existing record with new information? Not really all that different. Pull all existing relevant information into a Hash and use it as a Reference Lookup. Insert or Update from there.

How much of an 'example' do you need? Is that enough to get you going? I'm assuming you know what a Type 3 Dimension is, it's just the DataStage part you need help with...

If you do need more help, there's always Ken's post. Me too slow. :lol:
-craig

"You can never have too many knives" -- Logan Nine Fingers
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

If you want an example just upgrade to 7.1 and use the intelligent assistant, it can be used to create a set of example jobs for you. From memory I don't think this assistant was in the 7.0 release.
Post Reply