Store a sql query result in pentaho variable

Viewed 5769

I am new in PDI (passing from SSIS) and I am having some troubles by handling the variables issue.

I would like to perform this: From a sql select query I would like to save the result into a variable. For that reason I have created one job and two transformations, given that in pentaho every step is executed in parallel.

enter image description here

The first transformation is going to be on charge of setting the variable and the second transformation is going to use this result as an input. But in the first transformation I am having troubles by setting the variable, I do not understand where do I have to instanciate this variable to implement the "set season variable" step. And then how to get this result in the next transformation.

If anyone knows about this, or if you could recommend any link with a good example, I'll really appreciate it.

2 Answers

From your Job, start a Transformation:

Transformation to get SQL value to a variable

Overload transformation variable into global variable in your job and use it:

enter image description here

Related