Setting a variable with a value unknown beforehand

You just saw how to set a variable with a fixed value. Now you will learn to set a variable with a value that you don't know beforehand. There are many examples of this: 

  • The result of a query against a database
  • The result of a call to a web service
  • The current date
  • The name of a file

In all these cases, the solution involves creating a Transformation. The idea here is to create a dataset with a single row where the fields contain the values that you want to set to the variables. Let's see it as an example. Suppose that you want to set a variable with the current date, and a second variable with the date before, both in the format yyyy-MM-dd. This is how you do it:

  1. Create a Transformation. ...

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.