2

I am new to kettle and am trying to run a kjb file which in turn will execute a transformation(.ktr) file. My kjb file has "Set Variables" element which accepts a file to be read in parameter called "filePath".

Now here is my problem: when I run through Pentaho UI(spoon), I give the filePath a value and run it(It does not have any default value). There it takes the value of filePath and passes it to the ktr to be called within the kjb and completed successfully.

Now when I try to do the same thing from command line using command:

C:\pentahodi\6.1.0\data-integration>Kitchen.bat /file:"H:/new/newJob.kjb" /param:filePath="H:/new/newXml.xml" /level:Basic > H:/pentahoLog1.log  

It does not get the filePath value and terminates when ktr tries to access the file.

I am completely stuck.
Please help. Thanks.

Kashyap Kotak
  • 1,888
  • 2
  • 19
  • 38
KCK
  • 2,015
  • 2
  • 17
  • 35

2 Answers2

1

Make param argument included in double quotes. Use this:

C:\pentahodi\6.1.0\data-integration>Kitchen.bat /file:"H:/new/newJob.kjb" "/param:filePath=H:/new/newXml.xml" /level:Basic > H:/pentahoLog1.log  

This should solve your problem.

Kashyap Kotak
  • 1,888
  • 2
  • 19
  • 38
1

Try to track the parameters as seen by the Job and by the Transfo.

For the job, use the step called Write to log and a message like filePath = --${filePath}--. The first filePath is a text, the second is the value of the parameter named filePath. The -- are there to check there are no blancs or annoying characters.

You should see a new line with the filePath appears in the log. Maybe you remove the > file.log for the occasion.

When the parameter is read correctly at job level do the same for the transformation.

AlainD
  • 6,187
  • 3
  • 17
  • 31
  • And I bed it will be in the future too. – AlainD Apr 19 '18 at 15:23
  • sure. Can you please also look at https://stackoverflow.com/questions/49903156/stderr-256m-was-unexpected-at-this-time-in-pentaho-shell-script I am stuck there as well with no solution. May be you can answer @AlainD – KCK Apr 20 '18 at 11:53