Monday, September 12, 2022

Pentaho Tips - Copy Rows to Result and Get Rows from Result

 

Scenario

[Copy rows to result] and [Get rows from result] are grouped under Job category in Design pane of Transformation. 

[Copy rows to result] step saves the intermediate dataset to an allocated memory. You can specify any fields that you want to store. 

[Get rows from result] step works as a peer of [Copy rows to result] step, which retrieves the dataset from the memory. Similarly, you can choose which fields that you want to fetch.

They together provide you a way to keep a dataset for later use.


Example

Job defined in the example is showed in the following diagram, mainly composed of two transformations, one is to save data and the other one is to get data.


 You can find [Copy rows to result] step as follows where you need to specify fields to be saved.

 

[Get rows from result] step in the below is for you to fetch data saved in the above step. In the transformation, a [Text file output] step is added to output data into a text file for validation.



Output: 

As you can see from the text file below, the data saved by [Copy rows to result] step is successfully retrieved by [Get rows from result] step.

 





No comments:

Post a Comment

AWS - Build A Serverless Web App

 ‘Run your application without servers’. The idea presented by the cloud service providers is fascinating. Of course, an application runs on...