Page 1 of 1

Type 2 slowly changing dimensions

Posted: Tue May 31, 2005 8:48 pm
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'

Posted: Wed Jun 01, 2005 1:15 am
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.