Home > Data Integration (Kettle), Pentaho > Command line ETL Job Execution

Command line ETL Job Execution

I know this might seem pretty obivous to those that use Kettle frequently, but there’s a VERY easy way to execute Kettle jobs at the command line. Kitchen is the command line interface and is quite convenient for executing that ETL job you’ve built. Crontab anyone?

kitchen.sh -file=/mnt/pentaho-professional/pentaho-solutions/software-quality/data/etl/jira_do_everything.kjb
-OR-
kitchen.bat -file=c:\dir\jira_do_everything.kjb
kitchen.bat /file:”c:\dir\jira_do_everything.kjb” (from comments below, thanks!!!)

Does anyone use kitchen or pan and have any best practices or suggestions to offer?

  1. Don Parish
    December 22, 2006 at 8:25 am | #1

    Had trouble running this under WinXP at first. Page 4 at 1.4 Command Line Options says Windows has trouble with the “-” and “=”. Page 8 at 1.6 Run a job from file shows an example to fix this. Replace the ‘-file=’ with ‘/file:’

    My example which worked is:
    cd c:\program files\kettle
    kitchen.bat

    /file:”C:\Data\My%20Documents\Working\Mail%20Tracking\Kettle\Load_UPS_and_Fedex.kjb”

    the quotes are needed since there are spaces in the file path.

  2. Don Parish
    December 22, 2006 at 8:29 am | #2

    Correction to last post: the last line in the batch file should be:

    kitchen.bat /file:”C:\Data\My Documents\Working\Mail Tracking\Kettle\Load_UPS_and_Fedex.kjb”

    Don’t need the ‘%20′ if it is quoted.

  3. saravanan
    January 5, 2007 at 3:42 am | #3

    I encounter an error like,
    2007/01/05 15:43:33 – Kitchen – Start of run.
    2007/01/05 15:43:34 – DBCache – Loading database cache from file: [C:\Documents
    and Settings\Sundaresan\.kettle\db.cache]
    2007/01/05 15:43:34 – Kettle – Reading repositories XML file: C:\Documents and S
    ettings\Sundaresan\.kettle\repositories.xml
    ERROR: No repository provided, can’t load job.
    2007/01/05 15:43:37 – job1 (job1 (Thread-0)) – ERROR (version 2.3.1, build 63 fr
    om 2006/09/14 12:04:05 @ sam) : A serious error occured :
    2007/01/05 15:43:37 – job1 (job1 (Thread-0)) – ERROR (version 2.3.1, build 63 fr
    om 2006/09/14 12:04:05 @ sam) : Unable to end processing by writing log record t
    o table logtable
    2007/01/05 15:43:37 – job1 (job1 (Thread-0)) – ERROR (version 2.3.1, build 63 fr
    om 2006/09/14 12:04:05 @ sam) :
    2007/01/05 15:43:37 – job1 (job1 (Thread-0)) – ERROR (version 2.3.1, build 63 fr
    om 2006/09/14 12:04:05 @ sam) : Error occured while trying to connect to the dat
    abase
    2007/01/05 15:43:37 – job1 (job1 (Thread-0)) – ERROR (version 2.3.1, build 63 fr
    om 2006/09/14 12:04:05 @ sam) :
    2007/01/05 15:43:37 – job1 (job1 (Thread-0)) – ERROR (version 2.3.1, build 63 fr
    om 2006/09/14 12:04:05 @ sam) : Error connecting to database: (using class org.g
    jt.mm.mysql.Driver)
    2007/01/05 15:43:37 – job1 (job1 (Thread-0)) – ERROR (version 2.3.1, build 63 fr
    om 2006/09/14 12:04:05 @ sam) : Communications link failure due to underlying ex
    ception:

    ** BEGIN NESTED EXCEPTION **

    java.net.UnknownHostException
    MESSAGE: null

    STACKTRACE:

    java.net.UnknownHostException: null
    2007/01/05 15:43:37 – job1 (job1 (Thread-0)) – ERROR (version 2.3.1, build 63 fr
    om 2006/09/14 12:04:05 @ sam) : at java.net.InetAddress.getAllByName0(In

    is there any way to resolve it out.pls help

  4. saravanan
    January 5, 2007 at 3:51 am | #4

    Correction to last post
    while i execute my job, i encounter errors like:

    2007/01/05 15:43:33 – Kitchen – Start of run.
    2007/01/05 15:43:34 – DBCache – Loading database cache from file: [C:\Documents
    and Settings\Sundaresan\.kettle\db.cache]
    2007/01/05 15:43:34 – Kettle – Reading repositories XML file: C:\Documents and S
    ettings\Sundaresan\.kettle\repositories.xml
    ERROR: No repository provided, can’t load job.
    2007/01/05 15:43:37 – job1 (job1 (Thread-0)) – ERROR (version 2.3.1, build 63 fr
    om 2006/09/14 12:04:05 @ sam) : A serious error occured :
    2007/01/05 15:43:37 – job1 (job1 (Thread-0)) – ERROR (version 2.3.1, build 63 fr
    om 2006/09/14 12:04:05 @ sam) : Unable to end processing by writing log record t
    o table logtable
    2007/01/05 15:43:37 – job1 (job1 (Thread-0)) – ERROR (version 2.3.1, build 63 fr
    om 2006/09/14 12:04:05 @ sam) :
    2007/01/05 15:43:37 – job1 (job1 (Thread-0)) – ERROR (version 2.3.1, build 63 fr
    om 2006/09/14 12:04:05 @ sam) : Error occured while trying to connect to the dat
    abase
    2007/01/05 15:43:37 – job1 (job1 (Thread-0)) – ERROR (version 2.3.1, build 63 fr
    om 2006/09/14 12:04:05 @ sam) :
    2007/01/05 15:43:37 – job1 (job1 (Thread-0)) – ERROR (version 2.3.1, build 63 fr
    om 2006/09/14 12:04:05 @ sam) : Error connecting to database: (using class org.g
    jt.mm.mysql.Driver)
    2007/01/05 15:43:37 – job1 (job1 (Thread-0)) – ERROR (version 2.3.1, build 63 fr
    om 2006/09/14 12:04:05 @ sam) : Communications link failure due to underlying ex
    ception:

    ** BEGIN NESTED EXCEPTION **

    java.net.UnknownHostException
    MESSAGE: null

    STACKTRACE:

    java.net.UnknownHostException: null
    2007/01/05 15:43:37 – job1 (job1 (Thread-0)) – ERROR (version 2.3.1, build 63 fr
    om 2006/09/14 12:04:05 @ sam) : at java.net.InetAddress.getAllByName0(In

    kindly give me a suggestion

  5. Akas
    February 20, 2008 at 12:54 am | #5

    I tried with kitchen.bat /file:”my file name.kjb”. but its not working properly. it shows “The input line is too long. The syntax of the command is incorrect.” . Can u plz give me proper solution for that

  6. Sowssoiggab
    April 3, 2009 at 6:16 pm | #6

    cialis :-) cialis en ligne. Generique Inde pharmacie en ligne Bon Marche Cialis ;] cialis belgique soft bon marche

  1. No trackbacks yet.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>