Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Javascript Transformation Control

  1. #1
    Join Date
    Sep 2008
    Posts
    4

    Default Javascript Transformation Control

    Hi.

    I'm trying to control the flow of a Kettle Job (using whether a Transformation fails or runs to control the flow of the parent job using red vs. green hops from the Transformation) using the results of a Javascript evaluation within the Transformation's "modified java script value" step.

    I had thought that the way to do this was to set the "tran_Status" variable to one of the Transform constants, ERROR_TRANSFORMATION or CONTINUE_TRANSFORMATION, however this does not seem to work. Have I misunderstood this functionality?
    My script is as follows:

    numer = numfiles.getInteger();
    if
    (numer < 6) {
    tran_Status = ERROR_TRANSFORMATION;
    }



    I'm using Kettle 3.04...If there is another way to control evaluation flow please let me know. I'm aware that there is a case/switch step in the 3.1 release, but I must use 3.04. Javascript was the only way that I could see to do it.
    Thanks.
    -m

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

    Default

    trans_Status

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.