Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Can I pass a variable to a shell script?

  1. #1
    Join Date
    Sep 2007
    Posts
    13

    Default Can I pass a variable to a shell script?

    I have two variables defined in a transformation within the job. Is it possible to pass these two variables as arguements to a shell script step, defined a few steps later?

  2. #2
    Join Date
    Sep 2007
    Posts
    13

    Default

    Also can I use a wildcard (*) in the file exists step of a job, i.e. check to see if any files exist in a directory?

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

    Default

    For the first question: no... you can't use variables in the same transformation as where they are created (in 90% of the cases). Variable support in arguments to shell script job entry is also only available as of v.2.5.2

    For the second question: no. But you can e.g. use get filenames step and then count how many files you have.

    Regards,
    Sven

  4. #4
    Join Date
    Sep 2007
    Posts
    13

    Default

    Has 2.5.2 been released? The latest I can find on sourceforge is 2.5.1. If not, is it possible to create a wrapper script around the kitchen.sh call that would define some variables and have those variable still be valid within a shell script step within the job?

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

    Default

    2.5.2 is not yet released... For the wrapper no, maybe.... they're not actually 100% environment variables. You can define them in a kettle.properties file in the .kettle directory.

    Regards,
    Sven

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.