IconString Replace (Dictionary)0 ×

StreamableKNIME Base Nodes version 3.6.0.v201807061308 by KNIME AG, Zurich, Switzerland

This node replaces the cells in a selected column by elements of a dictionary. The cell is compared against the keys in the dictionary file and - given that a matching key is found - the cell content is then replaced by the value of the respective dictionary entry.

The dictionary must be plain text file, whereas rows in the file correspond to entries in a dictionary. Each line should be of the format

    value, key1, key2, key3, ...

The value string corresponds to the replacement string (matching keys are replaced with this value).The keys are given by the strings after the value (key1, key2, ... in the example), i.e. there are multiple keys possible. If no key matches the input string, the cell content remains the same. Only exact matches are possible.

Note, the dictionary does not get saved to the archive when the flow is exported. The dictionary file needs to be saved/exported separately. In general it's advisable to use the Cell Replacer node as this has a dedicated dictionary port.

Options

Target Column
The column containing the to-be-replaced elements.
Dictionary Location
The plain text file containing the dictionary entries (see above).
Delimiter in Dictionary
The delimiter character used in the dictionary file. In the above example this is a single comma (',') but can be (almost) any character. Special characters available are '\t' for a tab and '\\' for a single backslash.
Append Column
If checked, the replaced values will be put into a separate new column, which is appended to the table (specify the name in the textfield). If unchecked, the target column is replaced.

Input Ports

Arbitrary input data.

Output Ports

Input data but with input target column replaced or with an additional column.

Best Friends (Incoming)

Best Friends (Outgoing)

Workflows

Update Site

To use this node in KNIME, install KNIME Base Nodes from the following update site:

Wait a sec! You want to explore and install nodes even faster? We highly recommend our NodePit for KNIME extension for your KNIME Analytics Platform.