A typical de-normalized Calendar dimension table structure?

Can someone share the data structure ?

Any script to build the table for about 5 years history and 5 years future table ?

1reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi Lokesh,

    A lot of this comes down to what you need. Retail business will often need something to translate dates to a 4-4-5 or 4-5-4 calendar. Financial institutions will need fiscal year/month measures (that can be specific to a business). Different countries might want different holidays flagged, different starting points for 'day of week' etc etc.

    If you google 'date dimension' or refine that by adding 'csv', 'ddl' etc depending what you want you'll find lots of examples, csv files you can use as a starting point, code to generate a calendar (which you choose will depend on what languages you are comfortable with) etc etc.

    If you find a starting point you like then we could help with any issues importing it properly. 

    With regards general structure I've seen people use a natural key (the date itself) and a surrogate key with equal success. Internally dates are stored as integers so I've not observed any difference in performance. After that the attributes you use are down to your needs.

     

    Hope that helps, would be interested to hear about other experiences/stories from people. 

     

    Stuart

    Reply Like 1
Like Follow
  • 1 yr agoLast active
  • 1Replies
  • 310Views
  • 3 Following