Looking for data using a Dynamic SQL row step

The previously implemented example can also be implemented with the Dynamic SQL row step, as explained here:

  1. Create a new Transformation.
  2. From the Transformation created in the previous tutorial, copy and paste the Data Grid into the sample words.

The Dynamic SQL row step needs the query to run already defined in a field in the dataset. So, in order to create this field, we will use a JavaScript step.

  1. After the Data Grid step, add a JavaScript step.
  2. Use the JavaScript step to add a new field named STATEMENT. In the scripting area, type the following:
var STATEMENT;STATEMENT = "SELECT title, description FROM public.film" +             " WHERE upper(description) like '%" + upper(word1) + "%'" +  " AND ...

Get Learning Pentaho Data Integration 8 CE - Third Edition 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.