HOW TO CREATE A BATCH FILE TO RUN A SCHEDULED PENTAHO TRANSFORMATION
In this blog, we are going to discuss about scheduling a given transformation through
Windows Task Scheduler where we will schedule a batch file that runs on top of Pan.batch for a given transformation.
First and foremost we need to create the script that would run the specified transformation through a command line. For that Pentaho provides us with a Pan application which is a program that can execute transformations designed in the spoon when stored as a KTR file or in a repository.
Go to command line and write the following code which will execute the transformation
C:\Pentaho\design-tools\data-integration>Pan.bat /rep:Repo /user:user /pass
:password /dir:home/Pentaho /trans:SF_GetAccounts
Here we have defined the path where the Pan batch file is located and then we have written the script which calls that particular transformation getting into the repository and to that particular directory where our transformation is stored. Try to run the same and you should very well be able to run the given transformation.
Once you are done with this transformation our next aim is to create a batch file that runs on top of this batch file. The following code illustrates the same:
Pan.bat /rep:Repo /user:user /pass:password /dir:home/Pentaho /trans:SF_GetAccounts
The 2nd line takes you to the directory where your local Pentaho Data Integration is stored which is then followed by calling the Pan program with the transformation path. Now your batch file is ready which needs to be scheduled now according to the user’s requirement.
Now follow the underlying process to create a Task in the Windows Task Scheduler:
In general, category gives the Name of your Task and also the description if you need to. Also, select whether the Program should run while a user is logged on or when he is not.
Now give your start time and end time along with the option of running it on daily, weekly or monthly basis.
Give your directory where the batch file is stored in the action tab.
Hence this was all about creating a batch file to run a scheduled Pentaho transformation.
Best Open Source Business Intelligence Software Helical Insight is Here
A Business Intelligence Framework
-Sayed Shakeeb Jamal
How do I create a batch scheduler How do you schedule a transformation in Pentaho How to Create a Batch File to Run a Scheduled Pentaho Transformation how to run pentaho job from command line Use Command Line Tools to Run Transformations and Jobs Which command in pdi is used to run a job in windows platform