How To Use Java Script In Pentaho

Posted on by By admin, in Pentaho | 0

Pentaho is a business intelligence and data integration platform, and you can use JavaScript in various components and steps, such as in transformations or filters, to manipulate data. To filter rows in Pentaho using JavaScript, you can follow these general steps:

Here are the steps:

Start by creating a new transformation in Pentaho Data Integration (PDI) Spoon. A transformation is where you will define the data filtering process.

How To Use Java Script  In Pentaho

Add a input step. This could be a CSV file input, a database table, or any other source.

How To Use Java Script  In Pentaho

Here I am taking Csv file input for example.

Add a “Modified Java Script value” step to your transformation from left design tab. This step will be used to write the JavaScript code to filter rows.

How To Use Java Script  In Pentaho

Now open the JavaScript step to configure it. In the “Script” tab, you can write JavaScript code that filters rows based on your criteria. The JavaScript step has access to the data and can modify or filter rows as needed.

For Ex:

How To Use Java Script  In Pentaho

Assuming a group of players took part in a quiz game, and that their scores are in an input CSV file, and now with Java Script will figure out who is qualified and who is eliminated.

Now Press ok in bottom to save and exit script or you can test your script.

How To Use Java Script  In Pentaho


Now add output file and define output format ex: CSV or text file
And connect all of them.

How To Use Java Script  In Pentaho

Execute the transformation to filter the rows based on the JavaScript code you wrote in the JavaScript step.


By this Method you can filter out Output by using Java Script in Pentaho.

Thank You
Sharath Chandra Polkam
Helical IT Solutions


Best Open Source Business Intelligence Software Helical Insight is Here


A Business Intelligence Framework

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