Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Modify records according to other field content

  1. #1

    Default Modify records according to other field content

    Hi All,

    I have a requirement where the set of records look like this.

    Name:  Capture.JPG
Views: 32
Size:  37.7 KB

    for the part_number column you see some values are null.
    So we have to update it to the previous value, once it is null.

    if there is multiple null, than we will continue updating till it get a value.

    Thanks in advance.

    Chinmay

  2. #2

    Default

    Hi All,

    This is how i did it.
    used modified java script

    var Part_ID, lastPart;

    if (PART_NUMBER != null) {
    // Save it.
    lastPart = PART_NUMBER;

    } else {
    // Use it.
    Part_ID = lastPart;

    }
    var Part_ID, lastPart;

    if (PART_NUMBER != null) {
    // Save it.
    lastPart = PART_NUMBER;

    } else {
    // Use it.
    Part_ID = lastPart;

    }

  3. #3
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Depending on the Input step you are using there might be a REPEAT field option.


    Name:  215751.png
Views: 34
Size:  17.3 KB
    So long, and thanks for all the fish.

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.