Use Of Get Rows From Result And Copy Rows To Result Components In Pentaho

Posted on by By admin, in Pentaho | 0

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.

Use Of Get Rows From Result And Copy Rows To Result Components In Pentaho

Added input data from Data grid Component :

Use Of Get Rows From Result And Copy Rows To Result Components In Pentaho

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:

Use Of Get Rows From Result And Copy Rows To Result Components In Pentaho

Modified Java script result:

Use Of Get Rows From Result And Copy Rows To Result Components In Pentaho

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.

Use Of Get Rows From Result And Copy Rows To Result Components In Pentaho

STEP3:
Create one job, drag and drop two transformation components and browse for the two ktr’s.

Use Of Get Rows From Result And Copy Rows To Result Components In Pentaho

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

logo

Best Open Source Business Intelligence Software Helical Insight is Here

logo

A Business Intelligence Framework

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments