Skip to main content

Pentaho+ documentation has moved!

The new product documentation portal is here. Check it out now at docs.hitachivantara.com

 

Hitachi Vantara Lumada and Pentaho Documentation

Modify values from a single row

 

You can use the Modify values from a single row step to build complex hierarchical data in two ways:

  • You can take hierarchical data from a previous step and modify the data using data from incoming incoming fields using a series of path definitions for the single row of input. .
  • You can also take non-hierarchical data and create a new or modify an existing hierarchical data structure and pass the structured data 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 a single row step on the canvas. You can customize the name or leave it as the default.
Modify values from a single row step window

Targets

 
Field Description
Target field name Name of the hierarchical output field that is generated or modified using the fields from a previous step.
Target hierarchical path Specify the hierarchical path inside the Target field name field. See Hierarchical data path specifications
Modify action Specify the action to perform on the Target field name. The modification actions you can perform with this step are:
  • SET – Sets the Target hierarchical path in the Target field name to the value specified in the Value field name field.
  • SET_IGNORE_NULL_VALUE - Performs the SET Modify action if the value field is not null.
  • SET_IF_NULL - Sets the Target hierarchical path to the value specified in the Value field name field if the target hierarchical path of the HDT is null.
  • UNSET - Unsets the Target hierarchical path in the Target HDT (before: { hello: null, hello2: 10 }, after: {} )
  • UNSET_IF_NULL - Unsets the Target hierarchical path if the value stored at the path is null (before: { hello: null, hello2: 10 }, after: { hello2: 10} )
Value field name Specify the name for the incoming field name from a previous field name.
Output set path field name (Optional) Specify the field name of the output path of the field that the step modified or created.

Example

 

The sample transformation Modify_From_A_Single_ROW.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 transformations explain how the steps are used.

Modify values from a single row example ktr