Need SCD 2 and SCD 1 logic help

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
jagadam
Premium Member
Premium Member
Posts: 107
Joined: Wed Jul 01, 2009 4:55 pm
Location: Phili

Need SCD 2 and SCD 1 logic help

Post by jagadam »

Hi,

We have designed SCD-2 model maintaing the history in dimension tables. Now a requirement came up to include current value for the attributes. ( SCD-1). For this we are planning to add new attribute for each and every SCD-2 attribute to the dimension table so that the current job maintains the scd-2 history and have to create another process to update the new attributes with current value ( CURR_IND='Y) on business keys.

Can i achieve this with in the same job instead of creating post process step for each dimension?Please throw some inputs on better way of desigining.

Thanks in Advance
nani1974
Premium Member
Premium Member
Posts: 52
Joined: Fri Aug 31, 2007 10:59 am

Post by nani1974 »

Hi,
As per my knowledge you can do both in SCD stage..

Kumar.
Regards,
Kumar.V
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

SCD-1 is not "include a current value for the attribute". SCD-1 is "update the dimension record with the new value". In SCD-1 there is only ever a current value - SCD-1 does not preserve history.

The SCD stage does allow you to generate an IsCurrent indicator field when SCD-2 is in play.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

I think you are getting confused between the SCD types. Type 1 means you have no history in that dimension at all - so current flag is irrelevant. Type 2 means you have current values and historic values. You can include a current flag and it remains type 2 but it makes it easier to find the current values. If you want a dimension row with two attributes - one with the historic dimension value and one with the current value then you are into Type 3. Two sets of attributes that describe the same thing.

What you describe will be either standard Type 2 or modified Type 3 functionality - as long as the requirement to keep history is retained.
Post Reply