Running transformations with Kettle Pan
Pan is a command line program which lets users launch the transforms designed in Spoon. The transforms can be either run as an XML file (with the ktr extension – kettle transformation) or directly from the repository.
Running the pan.bat script (pan.sh for Linux/Unix) without any parameters will list the available options. In our tutorial we will run the transformations both ways – one written in an XML file and the other directly from the repository.
- Transformation run from an XML file is pretty straightforward and can be executed by the following command:
pan.bat /file:"D:\DW\pentaho\trsfCountry.ktr" /level:Basic - Transformation run directly from a repository requires passing the respoitory details and login parameters. Transformer designed in the Spoon tutorial lesson can be run in the following way:
pan.bat /rep:"DWDEV" /trans:"trsfCountry" /dir:/ /user:admin /pass:admin /level:Minimal
Please refer to the execution log details printed below (log level set to Basic):
10:36:28,582 INFO [Pan] Pan - Logging is at level : Basic 10:36:28,582 INFO [Pan] Pan - Start of run. 10:36:29,751 INFO [trsfCountry] trsfCountry - Dispatching started for transformation [trsfCountry] 10:36:29,751 INFO [trsfCountry] trsfCountry - Nr of arguments detected:0 10:36:29,751 INFO [trsfCountry] trsfCountry - This is not a replay transformation 10:36:29,844 INFO [trsfCountry] trsfCountry - This transformation can be replayed with replay date: 2007/06/05 10:36:29 10:36:29,844 INFO [trsfCountry] trsfCountry - Initialising 4 steps... 10:36:29,860 INFO [0] Countries starting with S.0 - Opening output stream in default encoding 10:36:29,860 INFO [0] Rejects.0 - Opening output stream in default encoding 10:36:30,140 INFO [0] Countries starting with S.0 - Starting to run... 10:36:30,140 INFO [0] Rejects.0 - Starting to run... 10:36:30,140 INFO [0] Filter rows.0 - Starting to run... 10:36:30,140 INFO [0] Table input.0 - Starting to run... 10:36:30,327 INFO [0] Table input.0 - Finished reading query, closing connection. 10:36:30,327 INFO [0] Filter rows.0 - Finished processing (I=0, O=0, R=249, W=249, U=0, E=0) 10:36:30,327 INFO [0] Rejects.0 - Finished processing (I=0, O=219, R=218, W=0, U=0, E=0) 10:36:30,327 INFO [0] Table input.0 - Finished processing (I=249, O=0, R=0, W=249, U=0, E=0) 10:36:30,343 INFO [0] Countries starting with S.0 - Finished processing (I=0, O=32, R=31, W=0, U=0, E=0) 10:36:30,405 INFO [trsfCountry] trsfCountry - Transformation ended. 10:36:30,405 INFO [Pan] Pan - Finished! 10:36:30,405 INFO [Pan] Pan - Start=2007/06/05 10:36:29.345, Stop=2007/06/05 10:36:30.405 10:36:30,405 INFO [Pan] Pan - Processing ended after 1 seconds. 10:36:30,405 INFO [trsfCountry] trsfCountry - 10:36:30,405 INFO [trsfCountry] trsfCountry - Process Filter rows'. 0 ended successfully, processed 249 lines. ( 249 lines/s) 10:36:30,405 INFO [trsfCountry] trsfCountry - Process Countries starting with S'. 0 ended successfully, processed 31 lines. ( 31 lines/s) 10:36:30,405 INFO [trsfCountry] trsfCountry - Process Table input'. 0 ended successfully, processed 0 lines. ( 0 lines/s) 10:36:30,405 INFO [trsfCountry] trsfCountry - Process Rejects'. 0 ended successfully, processed 218 lines. ( 218 lines/s)