PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.db.ms-sqlserver > Time Dimension Design Question
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Time Dimension Design Question

Réponse
 
LinkBack Outils de la discussion
Vieux 19/12/2007, 20h08   #1
Jimbo
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Time Dimension Design Question

Im trying to design my time dimension and need to add a field to
handle null dates in the fact. So if at the time of ETL the date isnt
known, referential integrity will be preserved. Kimball suggests
insterting a record in the time dimension to handle this with a
description of 'Date not available' or something like that. However
if users are doing inner joins on the dimension they will obvisously
be pulling the datetime field..what should be in the datetime field
for this particular record?
  Réponse avec citation
Vieux 20/12/2007, 06h42   #2
jefftyzzer
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Time Dimension Design Question

On Dec 19, 12:08 pm, Jimbo <jamesfer...@hotmail.com> wrote:
> Im trying to design my time dimension and need to add a field to
> handle null dates in the fact. So if at the time of ETL the date isnt
> known, referential integrity will be preserved. Kimball suggests
> insterting a record in the time dimension to handle this with a
> description of 'Date not available' or something like that. However
> if users are doing inner joins on the dimension they will obvisously
> be pulling the datetime field..what should be in the datetime field
> for this particular record?


James,

If I'm reading right (DW Toolkit 2d Ed, pp 60, 261), I don't think
Kimball is suggesting that you put a dummy date in the dimensional row
(e.g. 1/1/1900 or 12/21/9999)--although I suppose you could do that if
that's a convention your users would agree to--but rather that that
value be NULL, just as it is in the source data. (This would mean,
though, that your date column in the dimensional table would have to
be NULLable.)

I suppose that when you then join the fact to the time dimension, you
could apply a COALESCE to the date column, e.g.,
COALESCE(time_dim.date, 'Date not Available').

--Jeff
  Réponse avec citation
Vieux 20/12/2007, 17h27   #3
Jimbo
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Time Dimension Design Question

On Dec 19, 10:42 pm, jefftyzzer <jefftyz...@sbcglobal.net> wrote:
> On Dec 19, 12:08 pm, Jimbo <jamesfer...@hotmail.com> wrote:
>
> > Im trying to design my time dimension and need to add a field to
> > handle null dates in the fact. So if at the time of ETL the date isnt
> > known, referential integrity will be preserved. Kimball suggests
> > insterting a record in the time dimension to handle this with a
> > description of 'Date not available' or something like that. However
> > if users are doing inner joins on the dimension they will obvisously
> > be pulling the datetime field..what should be in the datetime field
> > for this particular record?

>
> James,
>
> If I'm reading right (DW Toolkit 2d Ed, pp 60, 261), I don't think
> Kimball is suggesting that you put a dummy date in the dimensional row
> (e.g. 1/1/1900 or 12/21/9999)--although I suppose you could do that if
> that's a convention your users would agree to--but rather that that
> value be NULL, just as it is in the source data. (This would mean,
> though, that your date column in the dimensional table would have to
> be NULLable.)
>
> I suppose that when you then join the fact to the time dimension, you
> could apply a COALESCE to the date column, e.g.,
> COALESCE(time_dim.date, 'Date not Available').
>
> --Jeff


Ah that makes sense...thanks, thats what I'll do.

-Jim
  Réponse avec citation
Vieux 24/12/2007, 20h33   #4
Ed Murphy
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Time Dimension Design Question

jefftyzzer wrote:

> I suppose that when you then join the fact to the time dimension, you
> could apply a COALESCE to the date column, e.g.,
> COALESCE(time_dim.date, 'Date not Available').


Don't you have to CAST or CONVERT time_dim.date to CHAR or VARCHAR
first, lest it try and fail to convert 'Date not Available' to
DATETIME instead?
  Réponse avec citation
Vieux 15/01/2008, 03h36   #5
dmcmunn@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Time Dimension Design Question

On Dec 24 2007, 2:33 pm, Ed Murphy <emurph...@socal.rr.com> wrote:
> jefftyzzer wrote:
> > I suppose that when you then join the fact to thetimedimension, you
> > could apply a COALESCE to the date column, e.g.,
> > COALESCE(time_dim.date, 'Date not Available').

>
> Don't you have to CAST or CONVERT time_dim.date to CHAR or VARCHAR
> first, lest it try and fail to convert 'Date not Available' to
> DATETIME instead?


Please consider a web page I maintain dedicated to providing the
building blocks for kick starting a date dimension: http://www.ipcdesigns.com/dim_date/
All of the information is free including free downloads of scripts to
build a date dimension from scratch or download one that is pre-built.
If you find the downloads ful, please leave a comment. You don't
even have to register, but I do appreciate feedback. There are also
other free tool kits for data profiling and one for ETL metadata
management should be ready by February 1, 2008. Best of luck, Don
McMunn
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 11h32.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,20625 seconds with 13 queries