Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Using parameter files between Windows and Linux

  1. #1
    Join Date
    Nov 2010
    Posts
    23

    Question Using parameter files between Windows and Linux

    Hi

    I have the development environment on Windows and the actual PDI jobs run on a Linux server, I managed to run transformation/jobs built on windows to run on Linux using the kitchen.sh utility. However, this was a simple transformation with hard-coded file names and locations on my local "windows" machine, and I had to change those in the transformation on Linux for the transformation to work there.

    I would like to use parameter files to specify the location of the source files and eliminate the hard coding from the actual transformations, so that when I run on Linux I only need to change a parameter file before I start the jobs there.

    Can I specify a parameter file in the transformation and pass it during run time?
    Is there a way to pass a parameter file to kitchen via command line?

    You could also tell me if you had the situation before and what you have done about this if you don't mind...

    Thanks,
    harraz
    Last edited by harraz; 02-08-2011 at 12:16 PM. Reason: more clarity

  2. #2
    Join Date
    Mar 2010
    Posts
    159

    Default

    There are a few ways you can go about things...

    Probably one of the simplest is to use the kettle.properties file to define parameter values, and use a differing version in your Linux environment. You need to understand that the file is located in KETTLE_HOME/.kettle where KETTLE_HOME is an env var. Use the params directly in dialogs that allow variables, and gen fields from them where needed on per-row basis.

    Another is to define parameters for the job or transform and pass values for them in on the command line for kitchen.sh/bat and pan.sh/bat using the syntax described in docs.

    If you want for those values to be derived from some other param file and not typed in on a command line, then you'll need some wrapper script to read that param file and execute pan or kitchen.

    Another is to use the properties input step from within a transform to read an arbitrary properties file (your param file) and work with those.

    Regards,
    Jeremy

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.