etl-tools.info - datastage-tutorial- scd2-implementation?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
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.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.