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?
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.
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.
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
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
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