Type 2 SCD Key metadata change

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
seanc217
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 15, 2005 9:22 am

Type 2 SCD Key metadata change

Post by seanc217 »

I asked something similar, but I'm not sure I clarified this well so let me try again...

I have some data that originally has the following business key:

bank varchar2(4)
prod_type varchar2(2)
prod_sub_type varchar2(2)

I would use these fields in a change capture to capture any changes to my dimension rows.

Now, I have a change to the business key where

prod_sub_type changes from varchar(2) to varchar(4)

so where I have prod_sub type = "02", it now becomes "0002"

My question is how do I handle such a change so I can update my records. Currently the change capture will recognize them as new records and insert them without expiring the old records.

One idea I have is to make the column a number field and convert it because it really should be a number anyway. That way to DataStage there is no change to the record.

Any ideas?
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,

The Change Capture stage can output the deleted records as well as updated and new ones, so take the deleted records and update the end date.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Using a numeric data type is the correct approach.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply