Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: javascript row.addValue() break field recognition

  1. #1

    Default javascript row.addValue() break field recognition

    Hi!

    I'm still using javascript in Spoon/Kettle.
    Some of my scripts use row.addValue() to insert a field in the current row.
    When I preview the step, the field is added correctly. The problem is that I can't use my new fields in the following steps as he isn't recognized by Spoon. It doesn't even appear in the step output fields list.
    As exemple new fields don't appear in the Filter Row select box and I have to manually edit the .ktr file to add the fields.

    If we can specify the new field list in JS_mod it would be helpfull.
    I'm thinking in submitting an Improvement Issue on JIRA for Kettle.

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

    Default

    Also try it with v3... you will see a need for something else as well.

    Regards,
    Sven

  3. #3

    Default

    I haven't tried v3 yet.
    Is there any compatibility between v2.5 and v3 ?

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

    Default

    Yes, but not 100%. You probably need to review all javascript steps e.g..

    Regards,
    Sven

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

    Default

    Some of my scripts use row.addValue() to insert a field in the current row.
    That's what the fields section below the script is for: to export JS variables, add these to the row, send them on their way.
    Adding values to the row like that is not a good idea and there probably isn't a good use-case for it.

    HTH,

    Matt

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.