Slowly Changing Dimension Stage and initial Effective Date

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
meriem_ens
Participant
Posts: 30
Joined: Thu Jun 06, 2013 9:12 am

Slowly Changing Dimension Stage and initial Effective Date

Post by meriem_ens »

Hi,

In the scd stage is it possible to set the effective date column to a value (during the intial dimension load) and then set it to currentTimeStamp after.

The problem that I have now is that it is always set to CurrentTimestamp while for the initial load it should be 1900.01.01.

Is there an option in datastage to set an initial value for that column when the table is empty or should I do something like:

Execute Command :
test if dimension table is empty, if yes set v_effective_date to 1900.01.01 else set v_effective_date to currentTimeStamp

thanks
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

Intelligent SCD Stage?

Don't remember trying that one, but you may be able to pass that value in parameter? Sorry can't check it at the moment either.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You could always perform an update immediately after the initial load.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kaps
Participant
Posts: 452
Joined: Tue May 10, 2005 12:36 pm

Post by kaps »

We use separate set of jobs for initial load to handle such requirements. You can just copy the same set of jobs as initial load jobs and just change what you need to change and run only once.
meriem_ens
Participant
Posts: 30
Joined: Thu Jun 06, 2013 9:12 am

Post by meriem_ens »

priyadarshikunal wrote:Intelligent SCD Stage?

Don't remember trying that one, but you may be able to pass that value in parameter? Sorry can't check it at the moment either.
Yes, just like in SAP DataServices where the stage detect if it is the first load then assign a default effective date to the newly generated row.
meriem_ens
Participant
Posts: 30
Joined: Thu Jun 06, 2013 9:12 am

Post by meriem_ens »

ray.wurlod wrote:You could always perform an update immediately after the initial load. ...

Hi,

I don't want to update 1 000 000 rows.

Thanks
meriem_ens
Participant
Posts: 30
Joined: Thu Jun 06, 2013 9:12 am

Post by meriem_ens »

kaps wrote:We use separate set of jobs for initial load to handle such requirements. You can just copy the same set of jobs as initial load jobs and just change what you need to change and run only once.
There will be some code duplication, am I right ? or am I missing something.
Post Reply