run pentaho kettle from cmd. how to send the source files as a param?

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)?

Answers


I think you need to read this: http://wiki.pentaho.com/display/EAI/Pan+User+Documentation


You can use the following syntax for sh file

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


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

Here you can see an example,

This is other way


Need Your Help

Loading facebook wall feed JSON issues

javascript facebook json jquery

I'm trying to load a facebook wall feed with jQuery on the client side of my website.

Why does Perl autovivify in this case?

perl reference autovivification

Why does $a become an arrayref? I'm not pushing anything to it.