How to Create a Batch File to Run a Scheduled Pentaho Transformation

Posted on by By Nikhilesh, in Business Intelligence, Open Source Business Intelligence, Pentaho | 0

HOW TO CREATE A BATCH FILE TO RUN A SCHEDULED PENTAHO TRANSFORMATION

Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.

Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.

                                                                 —————————————————————————————————————————————-

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:

d:

cd /d”C:\Pentaho\design-tools\data-integration”

: call

Pan.bat /rep:Repo /user:user /pass:password /dir:home/Pentaho /trans:SF_GetAccounts

: exit

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:
Create Task
————–

1.General

———-

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.

2.Trigger

———

Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.

Now give your start time and end time along with the option of running it on daily, weekly or monthly basis.

3.Action

——–

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.

 

logo

Best Open Source Business Intelligence Software Helical Insight is Here

logo

A Business Intelligence Framework

-Sayed Shakeeb Jamal

 

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments