Skip to content

Replace Values

Transform

Find-and-replace within selected columns. Each rule targets one or more columns and runs in exact, contains, or regex mode, optionally case-insensitive. Multiple rules are applied in order. Use it to normalize variant spellings (USA / U.S.A. / United StatesUS), strip prefixes, mask values, or apply regex-based rewrites.

Replace Values is a streaming transform: each row is processed independently. For every configured rule, the targeted columns on that row are converted to a string and run through the rule’s matcher.

Match modes differ in how they treat the find value:

  • exact replaces the cell only when the entire string equals find.
  • contains replaces every occurrence of the literal substring find inside the cell. Special regex characters in find are escaped automatically.
  • regex treats find as a JavaScript regular expression and replaces every match. The g flag is always set; i is added when caseInsensitive is true. Capture groups are available via $1, $2, … in the replacement.

Cell values are coerced to a string via the standard cell-to-string rule (numbers and booleans become their string forms; objects are JSON-stringified) before matching, and the replaced value is always written back as a string.

If the rules list is empty, all rows pass through unchanged.

Input: One tabular data connection. Output: The same rows with the targeted columns rewritten according to the rules.

Each rule is one find-and-replace operation. Rules are applied in array order — a downstream rule sees the output of upstream rules.

FieldTypeDescriptionDefault
columnsstring[]Columns this rule applies to. At least one required.(none)
findstringThe string or regex pattern to look for. Required, non-empty.(none)
replacestringThe replacement value. Empty string is allowed (effectively a delete).""
matchMode"exact" | "contains" | "regex"How find is interpreted."contains"
caseInsensitivebooleanWhen true, exact and contains ignore case; regex adds the i flag.false

A country column has variant spellings; you want them all collapsed to US.

Before:

customercountry
Acme CorpUSA
Beta IncU.S.A.
Gamma LLCUnited States
Delta CoCanada

Configuration: Three rules in order, all targeting country with matchMode: exactUSAUS, U.S.A.US, United StatesUS.

After:

customercountry
Acme CorpUS
Beta IncUS
Gamma LLCUS
Delta CoCanada

Order IDs come in as ORD-2026-00123; you want just the numeric tail after the last hyphen.

Before:

order_idamount
ORD-2026-00123250
ORD-2026-00124450
ORD-2025-9998880

Configuration: One rule targeting order_id — find: ^ORD-\d{4}-, replace: empty string, matchMode: regex.

After:

order_idamount
00123250
00124450
9998880

Case-insensitive contains across multiple columns

Section titled “Case-insensitive contains across multiple columns”

You want every occurrence of acme (any case) replaced with Acme Corporation in both customer and notes columns.

Before:

customernotes
ACME IncRenewal for ACME storefront
beta llcacme integration in progress
Gamma Counrelated

Configuration: One rule — columns: ["customer", "notes"], find: acme, replace: Acme Corporation, matchMode: contains, caseInsensitive: true.

After:

customernotes
Acme Corporation IncRenewal for Acme Corporation storefront
beta llcAcme Corporation integration in progress
Gamma Counrelated
  • Targeted cells are always written back as strings. A numeric cell that gets matched (or even just touched) by a rule becomes its string form. 42 with rule find: "4", replace: "X" becomes "X2". If a rule’s find doesn’t match a particular cell, the cell still passes through the matcher and is rewritten as a string. To preserve numeric types, target only the columns that genuinely need text replacement. See apps/web/src/transforms/replace-values/logic.ts:84-93.
  • Rules apply in array order; later rules see earlier rules’ output. A rule that finds Acme runs before a rule that finds Acme Corp will collide. Order rules from most specific to least, or use non-overlapping patterns.
  • contains escapes regex metacharacters; regex does not. In contains mode, find: "U.S.A." matches the literal string. In regex mode, the same find matches U then any char then S then any char etc. Use contains unless you actually need regex semantics. See apps/web/src/transforms/replace-values/logic.ts:32-40.
  • Formula — derive new values via expression rather than literal find-and-replace.
  • Change Type — convert the resulting string back to a number or boolean if downstream nodes expect typed values.
  • Filter Rows — drop rows whose values match a pattern instead of rewriting them.