Skip to content

The Table: Text Function step applies a text function to the columns of each row that the function reads and writes the result to a new column of a copy of the source table. A NULL in any column the function reads gives NULL.

  • Source Table and Output Table — the table to read and the table to write.
  • Function — the function to apply. The form offers the functions in the two tables below and shows one column field, labeled for its role, for each argument the selected function reads.
  • Argument columns — the columns the function reads, in the order the table lists them. Each is required.
  • Output column — the name of the column added to the copy of the source.
Function Arguments Result
levenshtein First column, Second column Case-sensitive edit distance, as a whole number
soundex Text Text
json_format JSON Pretty-printed JSON text
json_field JSON, Path Text
json_set_text, json_set_number, json_set_boolean JSON, Path, Value JSON text with the value set
regex_match Text, Pattern, Match case True or false
regex_search Text, Pattern, Occurrence, Match case Position, as a whole number
regex_extract Text, Pattern, Occurrence, Match case Text
regex_replace Text, Pattern, Replacement, Match case Text
to_text_number Number, Pattern Text: the number written with a DecimalFormat-style pattern
to_text_datetime Date/time, Pattern Text: the date written with a date-time pattern
parse_date Text, Pattern The text read as a date
parse_datetime Text, Pattern The text read as a date-time

A converted Savant analysis can carry any of these functions, and they run the same way. A function the form does not offer shows its stored columns and is kept exactly as saved.

The Function list also offers these functions. Converted KNIME workflows use them too.

Function Arguments Result
damerau_levenshtein, hamming, lcs First column, Second column The matching edit distance, as a whole number
jaro, jaro_winkler First column, Second column 1 minus the similarity, 0 for equal texts
ngram_distance First column, Second column 1 minus the Dice coefficient of the character bigrams
jaccard_tokens, dice_tokens, cosine_tokens First column, Second column 1 minus the set similarity of the words of the two texts, 1 when either has none
java_compare First column, Second column The difference of the first differing characters, as Java’s compareTo gives it, as a whole number
java_regex Text, Pattern, Replacement (replace mode only) A Java regular expression read from a column: true or false in the matches and find modes, text in extract and replace
knime_count Text, Search text How many times the search text occurs, as a whole number
knime_binomial, long_pow Two numbers The binomial coefficient, or the integer power, in 64-bit arithmetic that wraps
encode, decode Text The text as base64 bytes in a character set, and back
url_encode Text The text percent-encoded as a form value, a space written +
list_sort_numeric Text A list held as separated text, sorted by numeric value
geojson_to_wkt JSON, Path The GeoJSON geometry at a path such as $.a[0], or $ for the text itself, as WKT
json_patch_apply JSON The document with a JSON Patch or Merge Patch applied
json_diff First JSON, Second JSON The JSON Patch that turns the first document into the second
json_schema_check JSON The errors the document has against a JSON Schema, as JSON; NULL when it has none
json_normalize JSON The document as normalized JSON text
json_to_xml, xml_to_json Document The document converted to XML, or to JSON
xml_well_formed XML The text when it is well-formed XML, else NULL
xslt XML, Stylesheet The document transformed by the XSLT stylesheet
message_text, message_tool_calls JSON The text of an AI message, or its tool calls as JSON

Set a function’s options in function_options:

  • java_regex — mode: matches (default, the whole text), find (anywhere), extract (group group of the first match, default 0) or replace (every match); flags i ignores case.
  • knime_count — modifiers: i ignores case, w counts whole words between whitespace.
  • encode and decode — charset, a Java character set name; the default is UTF-8.
  • json_patch_apply — patch, the JSON Patch array or Merge Patch object; merge is true for a Merge Patch; keep keeps the document when a patch test fails.
  • json_schema_check — schema; fail stops the step at the first error instead of returning it.
  • json_normalize — comments allows /* */ and // comments; fail (default true) stops the step on text that is not JSON, and false gives NULL.
  • json_to_xml — root, item, typed, parent_keys, namespace, text_key and text_key_enabled. xml_to_json — text_key, comments and pis.
  • list_sort_numeric — separator; empty, the text written for a list with no elements; and missing, the text of a missing element, sorted last.

By default the step reads every column of the source and writes every source column followed by the output column. Set source_columns to read only some columns, and target_columns (each {source, target, dtype}) to choose and order the written columns. A target column named like the output column takes its place, with the data type given.