Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Passing expression as part of update

  1. #1
    Join Date
    Jul 2009

    Default Passing expression as part of update

    Good afternoon,
    I am in my first week of PDI and have one small item I am struggling to solve after searching forum and docs. We are using PDI to update information from an external system into a new Java based application. The tables in Java have a field (object_version) that is being used for optimistic locking by the front end application. When I update a record in the table we need to set object_version = object_version +1 to avoid having our update stepped on be an in progress update being initiated in the application.

    Is there a way to have the update step include object_version = object_version + 1 without having to proceed the update step with a lookup to get the current object_version into the stream. The lookup leaves more opportunity to have conflicts that we would prefer to avoid.

    Thank you,

  2. #2
    Join Date
    Aug 2009



    If you are looking to pass a value into PDI (e.g., containing your new object_version value), here's what to look for.

    You can pass a value in as a command argument. You retrieve the value using "Get System Info". (This step is very useful for other things too, like getting system date.)

    If you are passing in the current value for object_version, you can increment it easily with a "Calculator" step.

    If you are not wanting to pass in a value for object_version, but want to have the update step itself increment the value without doing a lookup first, check out "Combination lookup/update". It might be a stretch, but it just might be able to meet your needs.

    Good luck!

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.