Hi,
Is there any predefined script or function or routine to populate the date dimension table. or how is it normally done?
I need the following in Date_dim
Date
Day number
Calender day number
Month Number.
Thanks
populating date dimension
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Give a bit more thought to what might be useful things to have, given your day granularity. For example:
first day of current month
last day of current month
year number
financial year
weekday name
weekday number in week
ordinal day number in calendar year
ordinal day number in financial year
season
workday/nonworkday
Use a Row Generator stage to generate dates from a start date (the Epoch property) for as many days as you require in the dimension (the Limit property). Use appropriate functions in a Transformer stage to generate the other fields based on your requirements (for example DateToMonth).
first day of current month
last day of current month
year number
financial year
weekday name
weekday number in week
ordinal day number in calendar year
ordinal day number in financial year
season
workday/nonworkday
Use a Row Generator stage to generate dates from a start date (the Epoch property) for as many days as you require in the dimension (the Limit property). Use appropriate functions in a Transformer stage to generate the other fields based on your requirements (for example DateToMonth).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.