Ejecución de las transformaciones Spoon usando la herramienta Pan
Pan forma parte de Pentaho Data Integration (Kettle ETL) y es una herramienta que permite ejecutar las transformaciones Spoon desde la línea de comando.
Las transformaciones spoon pueden ser ejecutadas como los ficheros XML (con la extensión ktr – que viene de kettle transformation) ó tambien desde el repositorio guardado en la base de datos.
Ejecución del programa pan.bat (pan.sh en Linux y Unix) sin ningunos parametros listara todas las opciones disponibles.
En este tutorial mostraremos como ejecutar transformaciones desde el fichero XML y desde el repositorio.
- Para ejecutar una transformación desde el fichero XML (ktr) hay que escribir la siguiente linea:
pan.bat /file:"D:\DW\pentaho\trsfCountry.ktr" /level:Basic
-
- Para ejecutar una transformación desde el repositorio hay que indicar la localización de un respositorio y aportar usuario con clave:
pan.bat /rep:"DWDEV" /trans:"trsfCountry" /dir:/ /user:admin /pass:admin /level:Minimal
El log de ejecución de la tarea Kettle Pan:
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)
|