0

I have a below requirement.

We want to create one PHP page and want to run Pentaho .kjb files from PHP Page. If we click on RUN button, then PHP should make a call to Pentaho and then .kjb files should execute.

Can someone guide how to achieve this?

Nilesh Patil
  • 91
  • 2
  • 11

2 Answers2

0

Pentaho Data Integration (PDI, aka Kettle), comes with a command line tool called "kitchen" which you can use to run .kjb files. (FYI, "spoon" can be used to run .ktr files.)

You can use something like the shell_exec command in PHP to run your .kjb file using kitchen, just like you would run it on the command line.

If I remember correctly, you need to make your current working directory be the directory that the kitchen.bat (or .sh) is in before you run it - I don't remember why, just that we had to be in that directory for things to function properly.

0

Hi it should be in the documentation:

http://wiki.pentaho.com/display/EAI/Kitchen+User+Documentation

You can run it via php

something like:

echo shell_exec('C:\Pentaho\design-tools\data-integration\kitchen.bat /file:D:\Jobs\updateWarehouse.kjb /level:Basic');
//use full path to kitchen.bat in case you dont have env variables setup
Daniel Li
  • 287
  • 2
  • 17