Time for action – calculating the top scores with a subtransformation
Let's modify the transformation that calculates the top scores to avoid unnecessary duplication of steps:
- Under the
transformation
folder, create a new folder namedsubtransformations
. - Create a new transformation and save it in that new folder with the name
scores.ktr
. - Expand the Mapping category of steps. Select a Mapping input specification step and drag it to the work area.
- Double-click the step and fill it like this:
- Add a Sort rows step and use it to sort the
score
field in descending order. - Add a JavaScript step and type the following code to filter the top 10 rows:
trans_Status ...
Get Pentaho 3.2 Data Integration Beginner's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.