SCD Type2 historical record are blank

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
saroshputhanpurayil
Participant
Posts: 6
Joined: Mon Nov 12, 2007 1:57 am
Location: mumbai

SCD Type2 historical record are blank

Post by saroshputhanpurayil »

Hi,
I have done a DS Job using SCD stage in Datastage V.8.
problem: Dimension Table have Type1 and Type2 fields. I have run the job with source table consisting of New Records and modified Records.

After execution of job The dimension table have

1] all new records are inserted
2] when Type 2 updation is there, the original records are preserved as hisorical records.But the Type2 field have lost thier historical values(this is the problem)
can any one help me to solve this problem.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Probably your support provider is best to ask. This sounds like a bug. What (exact) version of DataStage are you using? Can you post exactly how you are setting up the SCD stage for the Type 2 column?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
thumati.praveen
Participant
Posts: 106
Joined: Wed Oct 04, 2006 5:21 am

Post by thumati.praveen »

I did type1 and type2 in datastage 8 it is working fine their is no problem with datastage check once the purpose codes are set properly or not and check database constraints also it very impartent.

I want one clarification how you are passing parameters in SurrogateKey tab for database connection.
saroshputhanpurayil
Participant
Posts: 6
Joined: Mon Nov 12, 2007 1:57 am
Location: mumbai

Re: SCD Type2 Issue

Post by saroshputhanpurayil »

I am using Datastage V.8.0

in Output page of SCD stage we have DimUpdate tab.
here i have given the setting for Dimension Updation.
my settings were like this

Deivation ColumName ,Purpose , Expire
NextSurrogateKey() , PRODSK , Surrogate Key ,Diabled
SalesDetals.ProdSKU , SKU , Business Key ,Disabled
SalesDetals.ProdBRAND , BRAND , Type1 ,Disabled
SalesDetals.ProdDESCR , DESCR , Type2 ,Disabled
"N", CURR , Current Indicator(Type2) , "N"
CurrentDate(), EFFDATE , EffectiveDate(Type2) ,Disabled
'2099-12-31', EXPDATE , Expiration Date(Type2) , CurrentDate()



in In my DB2_UBB_API stage i have selected "Update Existing Rows Ot insert New ones"
gnan_gun
Participant
Posts: 30
Joined: Thu Aug 02, 2007 5:31 am
Location: Mumbai, India

Re: SCD Type2 historical record are blank

Post by gnan_gun »

Datastage 8.0(Websphere) has special stages i.e., SCD1, SCD2.

We can u these stages for SCD's.

With out using this also we can develop a job for SCD2.
thumati.praveen
Participant
Posts: 106
Joined: Wed Oct 04, 2006 5:21 am

Re: SCD Type2 Issue

Post by thumati.praveen »

saroshputhanpurayil wrote:I am using Datastage V.8.0

in Output page of SCD stage we have DimUpdate tab.
here i have given the setting for Dimension Updation.
my settings were like this

Deivation ColumName ,Purpose , Expire
NextSurrogateKey() , PRODSK , Surrogate Key ,Diabled
SalesDetals.ProdSKU , SKU , Business Key ,Disabled
SalesDetals.ProdBRAND , BRAND , Type1 ,Disabled
SalesDetals.ProdDESCR , DESCR , Type2 ,Disabled
"N", CURR , Current Indicator(Type2) , "N"
CurrentDate(), EFFDATE , EffectiveDate(Type2) ,Disabled
'2099-12-31', EXPDATE , Expiration Date(Type2) , CurrentDate()



in In my DB2_UBB_API stage i have selected "Update Existing Rows Ot insert New ones"

current indicator both side N only.if it expires then only N before put Y

and use EE stage for write method upsert it will wok out.
Post Reply