Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Passing environment variables, take 3

  1. #1
    Join Date
    Nov 2008
    Posts
    2

    Default Passing environment variables, take 3

    I found two threads asking about how to pass environment variables via a kitchen command line entry. The are:

    http://forums.pentaho.org/showthread...nment+variable

    and

    http://forums.pentaho.org/showthread.php?t=65563

    Both end in confusing posts that don't answer the question.

    How do you pass environment variables to a repository transform from a kitchen command line or kitchen file in unix?

    We run our ETL currently via pl/sql scripts and execute the jobs in a .ksh file like this:

    sqlplus $MBI_DATA_MART @/apps/scripts/Monthly/addr_ids_on_contract_dw $MONYY

    Where $MONYY is a parameter passed into the sql script. The value is like SEP08.

    We're re-writing all of pl/sql ETL into PDI. As other users have found, setting ${MONYY} in spoon for testing is easy, but how do we set it when running the job via kitchen from the unix command line?

    Thanks,
    Jim

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

    Default

    - Change the kitchen script with additional -D arguments to pass arguments
    - Pass positional arguments to kitchen which you can then retrieve via "get system info" step ... then they won't be variables yet, but you can use "set variable step" or javascript to set up the variables (in an extra transformation).

    - Combinations ... you can pass e.g. configuration file name to kitchen as argument, read the file, set the variables with an extra transformation and then execute your real functioniality.

    Also still open is http://jira.pentaho.com/browse/PDI-1381

    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.