Reputation: 1171
How to use pentaho kitchen to connect my central database repository under commandline?
Upvotes: 0
Views: 5234
Reputation: 714
Below, an Windows script batch example to run a Pentaho Data Integration kettle Job :
@echo off
SET LOG_PATHFILE=C:\logs\KITCHEN_name_of_job_%DATETIME%.log
call Kitchen.bat /rep:"name_repository" /job:"name_of_job" /dir:/foo/sub_foo1 /user:dark /pass:vador /level:Detailed >> %LOG_PATHFILE%`
The repository "name_repository" must be defined in /users/.kettle/repositories.xml. Juste below an example of this file :
<?xml version="1.0" encoding="UTF-8"?>
<repositories>
<connection>
<name>name_repository</name>
<server>hostname</server>
<type>MYSQL</type>
<access>Native</access>
<database>name_database_repository</database>
<port>9090</port>
<username>[name]</username>
<password>[password]</password>
<servername/>
<data_tablespace/>
<index_tablespace/>
<attributes>
<attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
<attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
<attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
<attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
<attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
<attribute><code>PORT_NUMBER</code><attribute>9090</attribute></attribute>
<attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
<attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
<attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
<attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
</attributes>
</connection>
<repository>
<id>KettleDatabaseRepository</id>
<name>name_repository</name>
<description>the pentaho data integraion kettle repository</description>
<connection>name_repository</connection>
</repository>
Upvotes: 0
Reputation: 5164
set up your connection in repositories.xml, you probably already have one of these if you have been using spoon. Make sure the repositories.xml exists in .kettle for the installation where you are running kitchen.
then simply use these command line options:
/rep "YOUR REPO NAME" /user "REPO USER" /pass "REPO PSS"
Upvotes: 2