Altering a data stream with Select values

While processing data there will come a need to alter field names, their data types or formats, and even removing fields altogether. The Select values step allows for all three functions and this recipe will show how to use it. The code for this recipe is available from the book's website.

How to do it...

  1. Create a new transformation. Add a Generate Rows step and a Generate random value step to the canvas.
  2. Create a hop between the two steps.
  3. Open the Generate Rows step. Create a field named row_test of type String and with a default value of test. Click on OK to close the step.
  4. Open the Generate random value step. Create two fields, one a random string (named random_num) and the other a random string (named ...

Get Pentaho Data Integration Cookbook Second 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.