Skip to main content

Dynamic Replace Tool

Use Dynamic Replace to quickly replace data values on a series of columns, based on a condition. The data replacement can be based on formulas or static values.

For example, if you have 100 different incoming columns and instead of the actual value in each column, you want to represent the number with a code of A, B, C, or D that represents a range. The Dynamic Replace tool can easily perform this task.

Inputs

  • D anchor: The data stream to modify. This input can also contain the 3 columns used to configure the tool.

  • R anchor: Replacement data stream, which contains 3 columns used to configure the tool. This input is optional if you've already included the configuration columns in the D anchor.

Configure the Tool

  • Column with Column Name: Select a column from the R data stream that contains column names from the D data stream.

  • Column with Boolean Expression: Select a column from the R data stream that contains an expression that is used to evaluate the data from the D data stream. The Boolean Expression column can accept any value other than zero.

    • Expressions are evaluated in sequence and stop at the first match. Therefore, an expression does not need to check for both ends of a range but does need to be in ascending order if evaluating a series of ranges.

    • Use _CurrentField_ to refer to the Column with Column Name that is currently being processed if an expression is used for more than 1 column.

  • Column with Output Value: Select a column from the R data stream that contains replacement data. The column can contain static values or expressions that act on the data from the D data stream.

  • Values are Expressions/Formulas: Select if the column selected for Column with Output Values contains expressions to have the expression act on the data from the D data stream.

Data Type Options

Because this tool replaces column values, you might need to update the column's data type.

  • Interpret Column Data Types: Designer Cloud sets the data type to accommodate all contained data.

  • Keep Original: The original column type is maintained. If the column type is incompatible for the replacement data, an error or conversion error occurs.

  • Change To: Manually set the column type and size. If the column type is incompatible for the replacement data, an error or conversion error occurs.

    • Type: Use the dropdown to pick the desired column type.

When Columns Don't Match

  • Warn (Continue Data Processing): Unmatched data fields are replaced with [Null] values. A Warning message is reported in the Interactive Results Grid for each unmatched field.

  • Error (Stop Data Processing): An error is thrown for the first unmatched data field and the workflow run stops.

  • Ignore (Continue Data Processing): Unmatched data fields are replaced with [Null] values. No message is reported in the Interactive Results Grid.

Outputs

  • O anchor: The output data stream that contains replacement data.

  • S anchor: The summary of replacements, including counts of each replaced column name and output value combinations.