Hi everyone,
I wanted to share a simple optimization that gave me a massive runtime improvement in Ataccama ONE Desktop expressions: switching from regular expressions to plain substring search using indexOf().
Previously, I used regex to check whether explanation fields contain a specific message. After switching to indexOf(), the runtime dropped from hours to seconds.
As I understand correctly after what i found regex processing is based on a full Java regular-expression engine (java.util.regex), which is powerful but can be expensive if you only need a simple “contains substring” check.
Expression example:
case(
indexOf(nvl(valid_rules_explanation, ''), 'text') >= 0, 1,
indexOf(nvl(invalid_rules_explanation, ''), 'text') >= 0, 1,
invalid_rules is not null, 0,
1
)- ONE expressions use 0-based indexing for string positions, so a match at the beginning returns 0, which is why >= 0 is used.
- indexOf(srcStr, subStr) returns the index of the first occurrence of subStr in srcStr.
- case() evaluates conditions in order and returns the value for the first true condition; otherwise it returns the final “else” value.
- I used nvl(x, '') to safely handle nulls and avoid surprises when the explanation fields are empty.
What are yours suggestions to gain more in performance of Ataccama?

