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 incoming fields by using a series of path definitions for the single row of input.

  • You can take non-hierarchical data and create a new hierarchical data structure or modify an existing hierarchical data structure and pass the structured data to other steps.

For more information, see Hierarchical data.

Step name

  • Step name: Specify 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

  • Target field name: Name of the hierarchical output field that is generated or modified using fields from a previous step.

  • Target hierarchical path: Specify the hierarchical path inside the Target field name field. See Hierarchical data path specificationsarrow-up-right.

  • Modify action: The action to perform on the target field.

    • SET: Set the target hierarchical path to the value specified in Value field name.

    • SET_IGNORE_NULL_VALUE: Perform SET only if the value field is not null.

    • SET_IF_NULL: Set the target hierarchical path to the value specified in Value field name if the target path is null.

    • UNSET: Unset the target hierarchical path.

      • Example: before: { hello: null, hello2: 10 }, after: {}

    • UNSET_IF_NULL: Unset the target hierarchical path if the value stored at the path is null.

      • Example: before: { hello: null, hello2: 10 }, after: { hello2: 10 }

  • Value field name: The name of the incoming field.

  • Output set path field name (optional): The field name that contains 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.

This step is also demonstrated in Advanced_Using_Multiples_To_Join_And_Edit.ktr. Comments in the transformations explain how the steps are used.

Modify values from a single row example KTR

Last updated

Was this helpful?