US and Worldwide: +1 (866) 660-7555
+ Reply to Thread
Results 1 to 4 of 4

Thread: Transformation to populate 'date' dimension

  1. #1
    Join Date
    Nov 1999
    Posts
    7,251

    Default Transformation to populate 'date' dimension

    Attachment: populate date dimension.xml Hi,
    In attachement you will find a simple transformation that populates a date dimension.
    (1950-2050)


    Have fun with it!



    Matt
    Matt Casters, Chief Data Integration
    Pentaho, Open Source Business Intelligence
    http://www.pentaho.org -- mcasters@pentaho.org

    Author of the upcoming book Pentaho Kettle Solutions by Wiley. Release date: mid-September 2010.

    Join us on IRC server Freenode.net, channel ##pentaho

  2. #2
    Join Date
    Aug 2006
    Posts
    13

    Default RE: Transformation to populate 'date' dimension

    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.

    Thanks,
    Tobias

  3. #3
    Join Date
    Nov 1999
    Posts
    7,251

    Default RE: Transformation to populate 'date' dimension

    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,
    Matt
    Matt Casters, Chief Data Integration
    Pentaho, Open Source Business Intelligence
    http://www.pentaho.org -- mcasters@pentaho.org

    Author of the upcoming book Pentaho Kettle Solutions by Wiley. Release date: mid-September 2010.

    Join us on IRC server Freenode.net, channel ##pentaho

  4. #4
    Join Date
    Aug 2006
    Posts
    13

    Default RE: Transformation to populate 'date' dimension

    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... :-)

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts