1
votes

I'm using Pentaho Kettle 4.0.1. Now I run a transformation from Java by providing a transformation file (XML type not KTR) and give some other XML files (in a src folder) that are meant to be inserted or updated in DB.

What I want is to do these things from a bat or shell file and not from Java. I'm not completely familiarized with kettle... I've seen some example regarding running a kettle transformation from a .bat file but there only is a file parameter that receives the transformation file (ktr). How do I pass as a param to pan.bat/pan.sh the src dir where my xml data files are (the data that is about to be inserted in DB)?

3

3 Answers

1
votes

You can use the following syntax for sh file

sh pan.sh -file:Transformation1.ktr -param:parameter1=myname -param:parameter2=30

0
votes

You can use transformations named parameters to capture the xml files path

Here you can see an example,

This is other way