Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Replace kettle variables in JVM

  1. #1
    Join Date
    Nov 2014
    Posts
    5

    Default Replace kettle variables in JVM

    hi everyone

    we are using encr.sh to encrypt passwords and i am storing the encrypted passwords in kettle.properties file.
    we wrote a transformation which has these steps:
    getvariables: to get variables from kettle properties
    modified javascript: in which we are decrypting passwords and storing it in temporary variables
    setvariables: here we are assigning the decrypted passwords to the kettle variables with scope as "Valid in the Java Virtual Machine"
    write tolog: which displays the both temporary varaibles and kettle variables.

    when we run this transformation,, its decrypting the password and decrypted password shown in the output.

    But when we run a new job, we are calling this kettle variables to check if it is using the decrypted passowrds, but these variables are showing only encrypted passwords.

    Can someone help me in how to change or set the kettle variables values , so that other jobs can see the new values?

  2. #2
    Join Date
    Jul 2009
    Posts
    476

    Default

    I don't know exactly how you are using these passwords, but I use encrypted passwords for database connections. In the database connection dialog box, I use the ${parametername} syntax in the password field to refer to the password parameter name, and it works. (It looks a bit funny when entering it through the GUI, because the keystrokes show up as asterisks, but if you look in the transformation file, you'll see the ${parametername} value. where "parametername" is what the variable is called in kettle.properties.

    Maybe you could just refer to your encrypted variable from kettle.properties using the ${parametername} notation in your transformations and jobs, since most of the steps support it, instead of trying to formally pass it around as a variable.

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.