Modify values from grouped rows
Use the Modify values from grouped rows step to build complex hierarchical data and group data based on a hierarchical data field using path definitions on an ordered group of input rows. This step modifies hierarchical data to form nested JSON key-value pairs. It can also build complex data by nesting arrays, objects, and key-value pairs. The step takes non-hierarchical data and changes it to hierarchical data and sends it to other steps. See Hierarchical data for an overview of hierarchical data in Pentaho.
General
- Step name: Specifies the unique name of the Modify values from grouped rows step on the canvas. You can customize the name or leave it as the default.
Grouping fields
Field | Description |
Field name | Specifies the field name that will be used to group the incoming data. |
Pass Through? | Select to add the specified incoming field to the output fields. |
In the Target hierarchical field, you can specify a new field name to be added into output or select an incoming hierarchical field name to modify.
Modifications
Field | Description |
Hierarchical path | Specifies the path that has to be modified or created inside the target hierarchical field. See Hierarchical data path specifications |
Action | Specify the action to perform on the Target field name. The modification actions you can perform with this step are:
|
Value field name | Specifies the field for performing the previous action. |
Example
The sample transformation Modify_From_Grouped_Rows.ktr demonstrates the capabilities of this step and is available in the plugin distribution package in the data-integration/plugins/hierarchical-datatype-plugin/samples/transformations directory. The use of this step is also demonstrated in the Advanced_Using_Multiples_To Join_And_Edit.ktr transformation. Comments in the transformation explain how the steps are used.