Hitachi Vantara Pentaho Community Forums
Results 1 to 11 of 11

Thread: Linux: where will I find kettle.properties on linux box

  1. #1
    Join Date
    Jul 2008
    Posts
    26

    Question Linux: where will I find kettle.properties on linux box

    Hi,

    I am trying to run a job as a shell script which is calling the kitchen.sh file and

    I am using some environment variable in my jobs which are set in kettle.properties on windows machine works fine and get replaced.

    when I am running those shell script on linux box its is not able to find and replace those enviorment variable.

    my qn where should i put my kettle.properties file.

    aftre reading one of the thread i have moved kettle.properties to following folder bcas i loged in as a root.

    /home/sysadmin/.kettle/

    still its not working and the variable is not get replaced.

    pls help.


    Thanks
    Novin

  2. #2
    DEinspanjer Guest

    Default

    is /home/sysadmin configured as the HOME of your root account? Did you check to see what the HOME variable is set to? For root on many Linux distributions, it would be /root

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

    Default

    Just start up spoon.sh and afterwards do a search on kettle.properties . The first time you start spoon a sample file will be installed.

    You can also set environment variable KETTLE_HOME and then it will search for the .kettle directory in that directory.

    Regards,
    Sven

  4. #4
    Join Date
    Jul 2008
    Posts
    26

    Default

    Hi Guys,

    Thanks for all ur responses.

    Ya my home is /root

    I moved my .kettle folder to /root and its working now.

    Thanks
    Novin

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

    Default

    Please don't run anything you don't need to as root. It's a serious security risk any way you look at it and Kettle certainly doesn't require it in any way.

  6. #6
    Join Date
    Jul 2008
    Posts
    26

    Question

    Hi Mat,

    Thanks for your reply.

    Its really urgent for me to solve this issue.

    Hope you will help me to crack it.

    I am running into another problem which is only on linux not on windows.

    This issue is related to environment variable which has a root scope "r".

    When my Javascript step :Set ListingId get executed It throwing error pasted at the end.

    In following java script step is the part of the transformation which can be recursively called based on no. of multiple files.

    a file name is passed to the transformation and based on it
    In the code i check whether that file actually reside or not if yes.

    then try tio connect to the database and fetch the listing id for that file.

    Where listing Id (record is per file) environment variable which has a root scope "r".

    This code works fine on Windows but failing on Linux


    Here is the JavaScript's code.
    ==========================

    //get the feed Filename and remove path info.
    var feedname = FName;
    var exppath = getEnvironmentVar("uploaddir");
    exppath = exppath + "\\feeds\\Expense\\feeds\\upload\\";
    var pathlength = exppath.length ;
    feedname = substr(feedname, pathlength);
    //Alert(feedname);

    //Get Feed_Listing_Id for filename
    var strConn = "PharmaTrak";
    var strSQL = "SELECT PK_ID FROM FEED_LISTING WHERE FK_FEED_STATUS_ID = 1 AND File_Name = '" + feedname + "'";
    var xArr = fireToDB(strConn, strSQL);
    //Alert("array-val:" + xArr[0][0]);
    var listId = xArr[0][0];
    setVariable("LISTING_ID",listId, "r");

    //Alert("Ganesh:"+listId);

    ===================================

    Here is the error.





    ERROR 11-09 07:40:06,212 (LogWriter.javarintln:403) -Set ListingId.0 - Unexpected error :
    ERROR 11-09 07:40:06,214 (LogWriter.javarintln:403) -Set ListingId.0 - org.pentaho.di.core.exception.KettleValueException:
    Javascript error:
    TypeError: Cannot read property "0.0" from undefined (script#18)

    at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.addValues(ScriptValuesMod.java:443)
    at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.processRow(ScriptValuesMod.java:738)
    at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.run(ScriptValuesMod.java:798)
    Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot read property "0.0" from undefined (script#18)
    at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3229)
    at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3219)
    at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3235)
    at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3254)
    at org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3267)
    at org.mozilla.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1286)
    at org.mozilla.javascript.gen.c24._c0(script:18)
    at org.mozilla.javascript.gen.c24.call(script)
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:340)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2758)
    at org.mozilla.javascript.gen.c24.call(script)
    at org.mozilla.javascript.gen.c24.exec(script)
    at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.addValues(ScriptValuesMod.java:356)
    ... 2 more

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

    Default

    Just a guess: perhaps you need to use forward slashes (/), not backslashes (\)?
    Forward slashes work on all platforms.

  8. #8
    Join Date
    Jul 2008
    Posts
    26

    Question

    Hi Matt,

    You are right I am right now zeroing to that part of the code only.

    How to make this piece of code as platform independent.

    if i will change it to forward slashes will it work with Windows?

    Thanks
    Novin

  9. #9
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Windows is based on Unix in its core, so it accepts forward and backward slashes in path-names.
    (Source: http://bytes.com/forum/thread23123.html )
    Last edited by Taqua; 09-09-2008 at 03:40 PM. Reason: added link
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

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

    Default

    Forward slashes are understood on all platforms, however, I don't know what process fills that database table you're querying.
    Only you can tell :-)

  11. #11
    Join Date
    Jul 2008
    Posts
    26

    Thumbs up

    Hi Matt,

    I found the issue.

    I was using //root//trak which is an environment variables used for any path variable and that is giving me the issue.

    Thanks for your reply.

    these 2 extra slashes were giving me the problem.

    Novin

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.