Icon

String Comparison - Hub Example

Comparing string content Comparison JSON contentJSON values can be compared, but as shown in this example the algorithm may not give the desiredresponse for modifications such as resorted fields where we may only be interested in fieldmodifications rather than position. AboutThe String Comparison not used googles `diff-match-patch` algorithm to identifydifferences in two strings. The generate diff is then assembled into an HTML Stringand rendered by KNIME where a green highlight represents an insertion and a redhighlight represents a deletion. Unhighighted content indicates equality. https://github.com/google/diff-match-patchhttps://neil.fraser.name/software/diff_match_patch/demos/diff.htmlThe node accepts any column that implements `StringValue` and will work oncolumns such as XML and JSON but your mileage may vary with regard to whetherthe diff lines up with your intent. Texts to compareComparisonMove the inputto the end as thecolumns are wideJSON 1JSON 2Do the comparison Table Creator String Comparison Column Resorter ContainerInput (JSON) ContainerInput (JSON) Column Appender String Comparison Comparing string content Comparison JSON contentJSON values can be compared, but as shown in this example the algorithm may not give the desiredresponse for modifications such as resorted fields where we may only be interested in fieldmodifications rather than position. AboutThe String Comparison not used googles `diff-match-patch` algorithm to identifydifferences in two strings. The generate diff is then assembled into an HTML Stringand rendered by KNIME where a green highlight represents an insertion and a redhighlight represents a deletion. Unhighighted content indicates equality. https://github.com/google/diff-match-patchhttps://neil.fraser.name/software/diff_match_patch/demos/diff.htmlThe node accepts any column that implements `StringValue` and will work oncolumns such as XML and JSON but your mileage may vary with regard to whetherthe diff lines up with your intent. Texts to compareComparisonMove the inputto the end as thecolumns are wideJSON 1JSON 2Do the comparison Table Creator String Comparison Column Resorter ContainerInput (JSON) ContainerInput (JSON) Column Appender String Comparison

Nodes

Extensions

Links