Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Get parameter values from CMD script to PDI job/transformation

  1. #1
    Join Date
    Mar 2016
    Posts
    4

    Default Get parameter values from CMD script to PDI job/transformation

    Hi, all

    We have database users/passwords in a KeePass (http://keepass.info/) file. KeePass has a plugin to access the users/passwords KPScript (http://keepass.info/help/v2_dev/scr_sc_index.html). Basically if set up and executed on CMD it will print out users/passwords or any other information saved to the KeePass password file entry. Those can be filtered and is a rather good password manager.

    As we have multiple database users with similar structure then PDI could be useful to automate deploy of changes to all of them. So the use case would be to execute PDI job deploy.kjb it would access the KeePass to get the list of database users and passwords and then loop the users to deploy changes to the schemas.

    Any ideas how to get the users from the command line to PDI variables? I would not like to use files as the job could fail at any point and I would not like to have the users/passwords in some open to read file.

    Br,
    _pj_

  2. #2
    Join Date
    Feb 2016
    Posts
    9

    Default

    Is the environment Windows or Linux?

    If it is Linux, you can use "Run SSH Commands". If it is Windows, Use Shell at the Job level or Execute at the transform level.

    http://wiki.pentaho.com/display/EAI/Shell
    http://wiki.pentaho.com/display/EAI/Execute+a+process

    Hope this helps.

    EDIT: I see you are Windows as you mentioned "CMD". SO yes, I would use "Shell".
    Last edited by rdudejr; 03-10-2016 at 12:22 PM.

  3. #3
    Join Date
    Mar 2016
    Posts
    4

    Default

    hi,

    thanks, seems I will get it working now.

    My environment: Win and PDI 4.4.0

    Used "Ecxecute a process" step in a transformation. I do not know is it a problem of KPScript or PDI, but I get all the users on one line, but i used "Split field to rows" as i have a username pattern and then returned the resultset to main job from which I loop over usernames and sub job in which I first get the password and deploy changes.

    Thank you, rdudejr, for the hints.

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.