etl-tools.info - datastage-tutorial- scd2-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
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

An SCD type 2 table is supposed to hold duplicates - it shows changes to that particular CUST_ID over time. When the REC_CURRENT_IND flag is set to Y that is the current record - that's the one used by most reports and queries. When the flag is set to N that's a superceded record and the REC_EFFDT field shows you when that row came into effect. I have only seen SCD Type 2 tables with START and END date fields so you can use between joins for historical reporting. So in this case there should also be a REC_ENDDT field set to a high date for current records (2999-12-31) and set to an end date for superseded records.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Link does not work.
Mamu Kim
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Remove the extra dot from the end. After you are done poking around over there, don't forget to wash your hands.
-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 »

Start at this page for the full set. Heed Craig's advice.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Of course it can. It's the surrogate key that can not. If some attribute of the customer (maybe name) changes, in a Type 2 SCD there will be a new row with the same CUST_ID, but with a new surrogate key.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
laknar
Participant
Posts: 162
Joined: Thu Apr 26, 2007 5:59 am
Location: Chennai

Post by laknar »

Hi,

I have exactly the same design.

When we load the records first time into the dimension table.
How can i load without Suurogate key stage,trigger.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:!: Start a new post. Include the details of your job and state your problem there.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply