replace(value: string, substring: string, replacement: string) -> string

Returns value with every occurrence of substring replaced by replacement, using non-overlapping whole-substring matches (equivalent to replacing all occurrences in one pass).

If any of value, substring, or replacement is null, the result is null. An empty substring is allowed by the compiler but is usually undesirable because it can match between every character; prefer replace_regex when you need pattern-based substitution.

Domain

This is a scalar function (calculates a single output value for a single input row).

Categories

Examples

make_col normalized:replace(host, " ", "_")

Replaces every space in a host string with underscores so it can be used as a single token in paths.