Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: getEnvironmentVar in javscript step not working properly

  1. #1
    Join Date
    May 2008
    Posts
    10

    Default getEnvironmentVar in javscript step not working properly

    Hi,

    I tried to get environment variables inside javascript step.
    I cannot retrieve the "Internal" variables.

    Below are some Alerts I tried and the first 2 could get user.dir and user.name but not the next 2.
    I tried with 3.2.0 and 3.2.5.

    Alert(getEnvironmentVar("user.dir"));
    Alert(getEnvironmentVar("user.name"));

    Alert(getEnvironmentVar("Internal.Kettle.Version"));
    Alert(getEnvironmentVar("Internal.Transformation.Filename.Directory"));

    Does anyone have the same experience?
    Is this a bug or a feature?

    Herman

  2. #2
    Join Date
    Jul 2007
    Posts
    247

    Default

    For the last two ones use the getVariable(varName, varDefault) function. The "internal" variables are no real environment variables of the OS, but internal Kettle variables. AFAIK, the function getEnvironmentVar works only for OS/Java environment variables that are exposed to the JVM.


    HTH,
    Ben

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.