Introduction
The “Get Rows From Result” and “Copy Rows to Result” components are simple but versatile tools in Pentaho’s ETL toolkit. It allows you to copy rows from your data flow and store them in a temporary result set. This result set can be used in subsequent steps or even transferred to other transformations or jobs.
Here are the steps:
STEP1:
Create a transformation with data grid component and add data to it then connect this component to “Copy Rows To Result” component as shown in the below figure.
Added input data from Data grid Component :
STEP2:
Create another transformation, drag and drop the “Get Rows From Result” component and add all the required fields that you mentioned in the data grid component which is in previous transformation. Take modified java script component if you want to perform any tasks like concatenation.
Get rows from result:
Modified Java script result:
Add Text file output component at the end and add the output fields that you want to see in the output file as shown in the below screenshot.
STEP3:
Create one job, drag and drop two transformation components and browse for the two ktr’s.
STEP4:
Create Run the transformation and check the expected data in the output file.
Conclusion:
By following the steps in this document, Instead of taking same components in each transformation to use same data, by using copy rows to result and get rows from result components we can use the same data (which is mentioned in only one transformation) in many transformations.
Thank You
Vani Bolle
Helical IT Solutions
Best Open Source Business Intelligence Software Helical Insight is Here