Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Job runs in GUI, not command line

  1. #1
    Join Date
    May 2006
    Posts
    12

    Question Job runs in GUI, not command line

    Hi,

    We've upgraded to 3.0.0. GA, but have a small issue regarding running kitchen from the command line. When running the first transformation the job finishes with an null pointer exception. But the job does run correctly when started from within spoon.

    It might have something to do with the maximum number of errors that can be generated. Or is there something else wrong? I've included the log, so you can have a look at it.

    Hope somebody can help us out.

    Regards,

    Wessel
    Attached Files Attached Files

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

    Default

    Hi Wessel,

    The problem seems to occur when you want to replace a value marker (?) with null.
    It's possible, depending on how you created the transformation, that in Spoon you get an empty string ("") as a value, not null.

    http://jira.pentaho.org/browse/PDI-531

    Re-load the transformation in Spoon and I'm sure the result will be the same.

    Matt

  3. #3
    Join Date
    May 2006
    Posts
    12

    Default

    Thanks, before we start changing all the transformations. Where can I get revision 6024? So that we can test it.

    Regards,

    Wessel

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

    Default

    Hi Wessel,

    If you are using the "Exec SQL" step in more than a one-off case, I think you are in a lot of trouble.
    The reason we created "Exec SQL" is to generate DDL, to create tables, generate table partitions, create/drop indexes, that sort of thing. Replacement of "null" values never comes into play in that scenario.

    The patch will be available on Friday as part of point update release 3.0.1.

    If you want to test it right away, download these files and place them in the lib/ directory:

    http://kettle3.s3.amazonaws.com/kettle-ui-swt-3.0.jar
    http://kettle3.s3.amazonaws.com/kettle-engine-3.0.jar

    All the best,

    Matt

  5. #5
    Join Date
    May 2006
    Posts
    12

    Default

    Dear Matt,

    First my apologies for the fact that I didn't react earlier. I was busy working on a different project. But I've tested 3.0.2 and everything seems to work now. But we have one small question left. We still can't provide more that five command line options.
    I'll be thinking of a solution in the mean time to work around it.

    What we want is to provide the following entries from the command line;

    RUN_DATE, to be able to simulate a certain valid date for which the process will run. This way we can run a process 'historically'.
    COMPANY_CODE, we have two companies who's data will be stored in the same dwh. But they come from different databases.
    UID: userid to login in to the DB with the right uid/pwd for the previously defined Company code
    PWD: see before.
    START_DATE: Start_Date for the period for which all the data should be retrieved from the source.
    END_DATE: End_Date for the period for which all the data should be retrieved from the source.

    Hope you can help us out here.

    Kind Regards,

    Wessel

  6. #6
    Join Date
    Jul 2007
    Posts
    247

    Default

    Are you running on Windows? Which version of PDI do you use? I think it's not a PDI problem, but part of DOS command line parameters..

    Take a look at kitchen.bat (Version 2.5.2, last line):
    Code:
    java %OPT% be.ibridge.kettle.kitchen.Kitchen %1 %2 %3 %4 %5 %6 %7 %8 %9
    This means only 10 parameters are passed to kitchen (including all parameters which are necessary to run the job). So if you need at least five parameters to run the job (job, user, pass, rep, dir), your 6th "own" parameter will never be passed to kitchen...

    Kitchen.bat in PDI 3.0.x changed:
    Code:
    java %OPT% org.pentaho.di.kitchen.Kitchen %_cmdline%
    Where %_cmdline% is a result of all parameters:
    Code:
    set _cmdline=
    :TopArg
    if %1!==! goto EndArg
    set _cmdline=%_cmdline% %1
    shift
    goto TopArg
    :EndArg
    Using something like %* should also do the trick.

    HTH,
    Ben

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.