View Full Version : Transformation to populate 'date' dimension

01-11-2006, 06:40 AM
Attachment: populate date dimension.xml (http://forums.pentaho.org/archived_att/kettle/populate date dimension.xml) Hi,
In attachement you will find a simple transformation that populates a date dimension.

Have fun with it!


09-05-2006, 05:08 AM
This transformation is incorrect. It labels 2006-01-01 as Monday, but that day in fact was a Sunday. I guess the error happened because of the age-old discussion about whether the week starts at Monday or Sunday. The 'Calculator Step' (imo correctly) thinks the day one of a week is Sunday, but the step where the names of weekdays are generated thinks the first day in a week is Monday.

I changed the 'DayOfWeekDesc Gen' step to start with Sunday to fix this.


09-05-2006, 05:18 AM
You are so right. I was indeed thrown off by the stupid American way of starting the week on a Sunday. :-)

Thanks for pointing that out. (the above attachment has been replaced)

All the best,

09-05-2006, 06:28 AM
Actually, Wednesday in german is called 'Mittwoch', which means something along the lines of 'Mid-Week'. If you consider that, starting the week at Sunday suddenly makes sense again... :-)