TRIM_TRAILING
Removes all occurrences of the specified trim string from the end of the string.
See also:
Syntax
TRIM_TRAILING(<string>, <trim_string>)
Examples
SELECT TRIM_TRAILING('datalakexx', 'xxx'), TRIM_TRAILING('datalakexx', 'xx'), TRIM_TRAILING('datalakexx', 'x');
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ trim_trailing('datalakexx', 'xxx') │ trim_trailing('datalakexx', 'xx') │ trim_trailing('datalakexx', 'x') │
├────────────────────────────────────┼───────────────────────────────────┼──────────────────────────────────┤
│ datalakexx │ datalake │ datalake │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────┘