0 votes
Getting some unusual behaviour from a "Transform String" shaker. When applied to a string column, it does not successfully remove leading/trailing whitespace. When encoding the text to UTF-8 (via the shaker), I can see that there is a non-breaking whitespace encoded there.

Is this behaviour intended? What can we do to go around this?

1 Answer

0 votes
Best answer

This is the expected behavior as the Trim processor uses the classic definition of whitespaces, not the extended Unicode definition (which includes the dozens of ways there exist to represent spaces).

To remove it, you have to use a Find/Replace with a regular expression



By nothing


This means "any number of characters of the Zs Unicode character class immediately followed by the end of the string ($)". To learn more about Unicode character classes, see https://en.wikipedia.org/wiki/Unicode_character_property 

1,194 questions
1,226 answers
11,754 users

┬ęDataiku 2012-2018 - Privacy Policy