1

When one runs a job from the server (by selecting server as below), does PDI pick up the "kettle.properties" file from the server or from the local computer they are running the job from? What about the Pentaho User Console portal - where is the file being picked up from when one runs the jobs from there? Is there anyway to tell PDI which "kettle.properties" file to use?

enter image description here

ERR
  • 213
  • 1
  • 6
  • 17

1 Answers1

3

AFAIK, there is no way to pick a kettle.properties file location from within the Spoon interface right before executing a job/transformation.

The kettle.properties file used is always linked to the instance of Kettle that executes the job/transformation.

  • When running a job locally with the PDI Client (Spoon), the kettle.properties file used is the one contained in the directory pointed to by the -DKETTLE_HOME JVM option (defined when running the spoon.sh or Spoon.bat launch scripts).
  • When running a job/transformation on the Pentaho Server (by either scheduling it explicitly on the Server from Spoon, or by running it from the PUC), the kettle.properties file used is the one located in the directory pointed to by the -DKETTLE_HOME JVM option defined when running the start-pentaho.sh or the start-pentaho.bat launch scripts.

Both the PDI Client and the Pentaho Server set the default location of KETTLE_HOME to ~/.kettle.

If you want to use a kettle.properties file located somewhere else, you will have to define the location of the Kettle Home directory yourself before starting the PDI Client or the Pentaho Server:

  • By setting an environment variable called KETTLE_HOME. It has to be set before running the Spoon launching scripts or the Pentaho Server launching scripts
  • For the Pentaho Server, you can also add the option -DKETTLE_HOME to CATALINA_OPTS (if the Pentaho Server uses Tomcat) by editing the launch script.

You can find this information on the Customize the Pentaho Server page.

naian
  • 126
  • 1
  • 5
  • Hi @naian thank you for this. I have some other pointers to clarify if that's ok: 1) I checked my local "spoon.sh" file and the variable KETTLE_HOME is set as -DKETTLE_HOME=$KETTLE_HOME. Where can I change the value of KETTLE_HOME so I know where this is pointing to? 2) On the server that we are running Pentaho from I looked up for the variable -DKETTLE_HOME but I didn't find anything related to that variable - either in "start-pentaho.sh" or "start-pentaho.bat". Where else do you think I could check please? 3) How do I add -DKETTLE_HOME to CATALINA_OPTS? – ERR Jan 13 '20 at 12:44
  • 1) You can change the value of `KETTLE_HOME` by editing the `spoon.sh` script directly (you'll just have to define a variable `KETTLE_HOME=/path/to/your/kettle/home` before the line where `-DKETTLE_HOME=$KETTLE_HOME` is written), or you can define an environment variable on your machine named `KETTLE_HOME` – naian Jan 13 '20 at 13:00
  • 2 & 3) Our startup scripts for the Pentaho Server were adapted by ourselves, so it is possible that `KETTLE_HOME` is not defined explicitely on a new installation. But you can set it yourself by adding the JVM option to `CATALINA_OPTS` by adding a line like the following in the startup script before the call to `startup.sh` is made : `CATALINA_OPTS="${CATALINA_OPTS} -DKETTLE_HOME=/path/to/your/kettle/home"` – naian Jan 13 '20 at 13:10
  • Hi @naian thank you for this. I have two other questions if that's ok: 1) Can I take the same steps that you mentioned above in (1) and do the same with the "spoon.sh" for the server? Or the only way to change the KETTLE_HOME for the server is by adding the line CATALINA_OPTS to the startup script? If so what is this startup script exactly - how is it called? Thanks – ERR Jan 13 '20 at 13:56
  • Hi @naian I just found this line CATALINA_OPTS="...." in the "start-pentaho.sh" file - I guess thats the startup script you mentioned? Also the company I work for has their Dev Server with 2 different "kettle.properties" files - they wanted to move the original one to a new directory and never deleted the previous one - hence 2. Interestingly whenever I run any jobs from the server using PUC, the new "kettle.properties" file is used. However, when I run jobs from the PDI client (selecting "server" as an option) the old "kette.properties" is used. Do you know what can be causing this? Thanks – ERR Jan 13 '20 at 14:45
  • Hi @ERR, yes I was refering to `start-pentaho.sh`. CATALINA_OPTS is set there before the call to `startup.sh` which is located under the `tomcat/bin` folder and starts the tomcat instance. Regarding the 2 `kettle.properties`, I cannot see how the same server instance could use 2 different `kettle.properties`. Is the Slave Server used for running jobs from the PDI Client pointing to the Dev Server ? – naian Jan 14 '20 at 11:57
  • Hi @naian thank you for this. I changed the CATALINA_OPTS line as you mentioned above and now I have the following scenario: when running jobs from the server via PUC (portal), the correct "kettle.properties" file is being picked up. However, I just figured out that when running jobs from Spoon and choosing to run from the "Server" (screenshot above), the "kettle.properties" that is being picked up is the one sitting under the user "Pentaho" - as in - "/home/pentaho/data-integration/.kettle" (the server is running linux). So why is PDI picking up that file if I am running PDI under my user? – ERR Jan 14 '20 at 13:25
  • Also @naian that's correct - the Slave Server used for running jobs from the PDI Client is pointing to the Dev Server. – ERR Jan 14 '20 at 13:28