Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: JOB - Scripting - javascript

  1. #1

    Default JOB - Scripting - javascript

    I am not having much luck wth the doco around using the Javascript Block in a JOB.

    I am attempting to do the following:
    - compare two variables populated by subtransformations and return true/false (so I can branch accordingly) if they are the same.

    Is there anyway to log or alert in the JOB>Scripting>Javascript Block?

    This DOES NOT work... .
    maxid1 and maxid2 are set by sub transformations, I can see there values in the log.

    var count1 = '' + parent_job.getVariable("maxid1", "");
    var count2 = '' + parent_job.getVariable("maxid2", "");
    count1 === count2
    This DOES work as expected (depending on hard coded values)....

    var count1 = 'yes';
    var count2 = 'yes';
    count1 === count2
    So clearly my .getVariable calls are not working, but I cant log/debug to confirm.

    Your thoughts
    Last edited by meconlin; 08-19-2012 at 03:50 PM. Reason: needed touch up

  2. #2


    I had bad variable name in subtransformation.
    The .getVariable javascript works fine.

Tags for this 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
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

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