Hitachi Vantara Pentaho Community Forums
Results 1 to 8 of 8

Thread: How to add sysdate using Value mapper in to Database?

  1. #1

    Default How to add sysdate using Value mapper in to Database?

    Hi Experts,

    I am trying to update the incoming data into a Database table.
    I have a field in my DB table called Update_date; in that I want to update the current date while updating record. I tried value mapper to change the value to sysdate. But it is not working is there any way to achieve it? Please guide me.

    Thanks,
    Darius

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    I have no clue what you want to do with value mapper. I would suggest to use "get system info" step.

    Regards,
    Sven

  3. #3

    Default

    Thanks,

    I used Get system information and got the current date to update in the field.

    Regards,
    Darius

  4. #4
    Join Date
    Apr 2006
    Posts
    2

    Default add sysdate using getSystemInfo

    I use a join rows (cartesian product) of my input stream with a getSystemInfo (today field). The output of the cartesian product has the same rows as the input stream plus the "today" field. In the next step I use a SelectValues to convert the Today field and at the end I insert all into the target table.
    Attached Files Attached Files

  5. #5

    Default

    Just wanted to thank emazzarella:
    your Kettle-Transaction works very well! :-)

  6. #6
    Join Date
    Sep 2007
    Posts
    834

    Default

    In fact, there is no need to use the join step. You can put the Get System Info Step just after the Select Values Step.

  7. #7
    DEinspanjer Guest

    Default

    I remember I did a test once (I posted it on the forums) where I compared having the get system info step directly inline with the stream vs using a stream lookup. The stream lookup is actually much faster because the system info step only has to execute once and it is dog slow in many cases.

  8. #8
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Indeed! We should fix that performance problem in a few steps like "Get Variables", "Get System Info", etc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.