Date Dimension Script
4 posters
Page 1 of 1
Date Dimension Script
Hi,
Does anyone have a good script to create a Date Dimension based on Kimball best practices?
thanks
Does anyone have a good script to create a Date Dimension based on Kimball best practices?
thanks
scabral- Posts : 58
Join date : 2012-05-02
Re: Date Dimension Script
Google date dimension. You will find many that are suitable.
BoxesAndLines- Posts : 1212
Join date : 2009-02-03
Location : USA
Re: Date Dimension Script
i have gone through the google search and found many examples, but wondering if someone feels that one is better than the other and why.
scabral- Posts : 58
Join date : 2012-05-02
Re: Date Dimension Script
Its a date dimension - what type of "best practices" are you looking for?
Typically its a type-1 dimension. 1 record for every date value. You can decide how many years it needs to contain based on your situation.
Atributes typically include year,month,day, both numeric and text, abbreviations, etc.
LAndrews- Posts : 132
Join date : 2010-05-13
Location : British Columbia, Canada
Re: Date Dimension Script
how about having a surrogate key or using another field like the date in MMDDYYYY format as the key? I've seen both ways being used.
scabral- Posts : 58
Join date : 2012-05-02
Re: Date Dimension Script
scabral wrote:how about having a surrogate key or using another field like the date in MMDDYYYY format as the key? I've seen both ways being used.
Use of YYYYMMDD (not MMDDYYYY) is to aid DBAs when defining date based partitions for fact tables. It allows them to know the values in advance. Otherwise any surrogate value is fine.
Similar topics
» Oracle Script to "build" a timeofday dimension(by minute)
» Date Dimension: Representing partial dates/Imputing date values
» Eliminate Date Dimension Surrogate Key
» Always link date fields to Date Dimension?
» Using the Date Dimension for Summary Fact Tables or new specialized Month Dimension?
» Date Dimension: Representing partial dates/Imputing date values
» Eliminate Date Dimension Surrogate Key
» Always link date fields to Date Dimension?
» Using the Date Dimension for Summary Fact Tables or new specialized Month Dimension?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|