As you just learned, running Pan and Kitchen not only involves providing the name of the ktr
or kjb
file, but also typing several options, for example, parameters or names of log files. You can type the full command manually when you are developing or testing, but when your work is ready for production, you want to keep things simple and automated. The following tutorial explains how to embedd the execution of Kitchen inside a script. Once you have the script, you can schedule its execution using a system utility, for example, cron
in Unix or scheduler
in Windows.
Suppose that you have a Job named process_sales.kjb
located in the c:\project\etl
folder (Windows) or /home/project/etl
folder (Unix), and you want to run it every day. You want to keep a history of logs, so the log of the execution will be written in a folder named C:\project\logs
(Windows) or /home/project/logs
(Unix-like systems). This is how you do it:
- Open a Terminal window.
- Create a new file with your...