Type 2 slowly changing dimensions

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sainath
Premium Member
Premium Member
Posts: 138
Joined: Fri Nov 19, 2004 3:57 pm

Type 2 slowly changing dimensions

Post by sainath »

Hi

I an new to datastage and i want to implement type 2 slowlychanging dimensions where i have to insert and update same record.I created 2 jobs insert and update

I conditions :

1.Isnull or carrier name not equal then INSERT

2. UPDATE

. not is null(c0de) and if i have new data with same code and diff name
i have to expire by one day( routine ) old one and insert new one

3.update .
notis null(code) and carrier name equal.just update.



i am thinking of doing update first so that we can expire record and insert.
but it is not working .i want your idea

I ALSO WANT TO KNOW HOW CAN WE EQUATE INPUT.EXPDATE COLUMN ='9999-12-31'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Search the forum for topics like Type 2 and SCD; this has been covered much in the past.

Are you using surrogate keys? If so, search for that topic too; it changes the way you might go about designing.

Comparisons can be achieved using comparison operators (such as "=") or by using the Compare() function. However, you need to ensure that the operands are compatible; if the date with which you're working is in internal format, then the constant must also be in internal format. That is, Iconv("9999-12-31", "DYMD"). For better performance evaluate this once, in a stage variable, rather than once per row.

And please don't "shout" (transmit in all upper case). It is considered poor netiquette.
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