Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Execute ktr transformation files over linux machine that was created on winodw

  1. #1

    Unhappy Execute ktr transformation files over linux machine that was created on winodw

    I am trying to Execute ktr transformation files over linux machine where i have configured kettle tool, But i am not able to do..

    My input file is a excel file that exists in c:/kettle251/test.xls on win OS & output file is text on same location,.. I do transformations on window machine & want to run those transformation on linux machine

    So how can i go so that i will follow same directory structure.

    As in linux directory structure is different from window, means there is no c or d drive while i created transformation.

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

    Default

    The same directory structure is out of the question. Either change the paths before you move the ktr's or rely on kettle variables to locate your jobs (which is what I think most people are doing).

    Make a kettle variable (e.g. in kettle.properties) KETTLE_SRC_DIR which you set differently in windows as in unix. In Windows: KETTLE_SRC_DIR=c:/kettle251/
    In Unix KETTLE_SRC_DIR=/home/...

    In the transformation you can then use as path ${KETTLE_SRC_DIR}/test.xls and it will work on both windows and unix.

    Regards,
    Sven

  3. #3
    Join Date
    Nov 1999
    Posts
    9,729

    Lightbulb

    Or, even better, use a relative path:

    Code:
    ${Internal.Transformation.Filename.Directory}/excel/someworkbook.xls
    Matt

  4. #4

    Default files Directory

    Can you give an example

    e.g my file are in

    c:/testfolder/excelfile.xls for window

    AND

    filesystem/testfolder/excelfile.xls for Linux

    should i use path as :

    ${Internal.Transformation.Filename.Directory}/testfolder/excelfile.xls

    Will it work on both window as well as linux system??

    Quote Originally Posted by MattCasters View Post
    Or, even better, use a relative path:

    Code:
    ${Internal.Transformation.Filename.Directory}/excel/someworkbook.xls
    Matt

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

    Default

    If you place the data files relatively to the .ktr in the same place...

    E.g. if you store on windows your .ktr in c:/kettle/ and on Unix in /home/oppics if you refer to ${Internal.Transformation.Filename.Directory}/testfolder you will get to c:/kettle/testfolder on windows and /home/oppics/testfolder on UNIX

    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.