Time Dimension

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
eldonp
Participant
Posts: 47
Joined: Thu Jun 19, 2003 3:49 am

Time Dimension

Post by eldonp »

Odata warehouse started in 2002 so the first date in the date dimension has been 01/01/2002 with a surrggate primary key of 1. Now we have to integrate other data into the data warehouse. The date dimension needs to be updated with dates back to 1994. Numerous fact tables have been created. What is the best practice for updating the date dimension? Should I have the surrogate primary key go into negative values or make 01/01/1994 the first date and update the fact tables?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Warning, this is all IMHO:

It's a *surrogate key*, meaning in-and-of itself it has no value. I'm not sure why you would feel the need to reorder all of them to coincide with the date. Unless you are assigning significance to the key and assuming you can order by it to get date order, then it doesn't really matter if the 'older' dates have a 'higher' surrogate key value.

-craig
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Craig is correct.
Equally, negative integers provide just as good uniqueness as positive integers. So, if you want to use negative integers, by all means do so.


Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
Post Reply