Our OLTP system records transactions with a UTC/GMT timestamp.
Business requirements state “Customers want reports based on their respective time zones”.
(daylight savings is a non issue at this point)
In the past what we have done is duplicated the “fact record” 8 times, once for each pertinent time zone.
(Currently we are only concerned with 8 time zones) then truncated the time off and joined the fact to a date dimension which holds all dates in all 8 time zones.
Sample of the Date Dimension;
date_key date time_zone
200701011 Jan 1 2007 GMT
200701012 Jan 1 2007 EST
200701013 Jan 1 2007 PST
The front end tool would then add a constraint based on the users local.
This worked pretty well as nobody was concerned about the time portion being truncated.
Things have changed however. We are getting more and more “time based” reporting requests.
We have thought about storing the original UTC timestamp in the fact and doing some fancy
time zone conversions in the reporting tool, however this doesn’t seem ideal.
My question is, how would you approach this given the above scenario?
Thanks to all who take the time to respond.
Nuffsaid.
Business requirements state “Customers want reports based on their respective time zones”.
(daylight savings is a non issue at this point)
In the past what we have done is duplicated the “fact record” 8 times, once for each pertinent time zone.
(Currently we are only concerned with 8 time zones) then truncated the time off and joined the fact to a date dimension which holds all dates in all 8 time zones.
Sample of the Date Dimension;
date_key date time_zone
200701011 Jan 1 2007 GMT
200701012 Jan 1 2007 EST
200701013 Jan 1 2007 PST
The front end tool would then add a constraint based on the users local.
This worked pretty well as nobody was concerned about the time portion being truncated.
Things have changed however. We are getting more and more “time based” reporting requests.
We have thought about storing the original UTC timestamp in the fact and doing some fancy
time zone conversions in the reporting tool, however this doesn’t seem ideal.
My question is, how would you approach this given the above scenario?
Thanks to all who take the time to respond.
Nuffsaid.