If you are running your transformation on the Pentaho engine, use the following instructions to set up the Merge rows (diff) step.
Enter the following information for the step:
- Step name: Specify the unique name of the transformation on the canvas. You can customize the name or leave it as the default.
The Merge rows (diff) step contains the following options.
|Reference rows origin
|From the drop-down list, select the input source for the original reference rows you want to compare. The input source will be a previous step in the transformation.
|Compare rows origin
|From the drop-down list, select the input source for the compare rows. The input source will be a previous step in the transformation.
|Specify a field name that will contain the flag indicating how the values were compared and merged in the output row.
|Keys to match
|Specify the field names that contain the keys on which to generate a match.
|Values to compare
|Specify the field names that contain the values on which to generate a comparison.
|Get key fields
|Click the Get key fields button to populate the Keys to match table with all the fields in the Reference rows origin step.
|Get value fields
|Click the Get value fields button to populate the Values to compare table with all the fields in the Compare rows origin step.
The Merge rows – mergs 2 streams of data and add a flag.ktr transformation located in the data-integration/samples/transformations directory illustrates how to use the Merge rows (diff) step.