Skip to main content

Celonis Product Documentation

MAP_CHARACTERS
Description

MAP_CHARACTERS returns a string with the characters defined in the match string replaced by the corresponding character.

Supported input column types: STRING

Output column type: STRING

Syntax
 MAP_CHARACTERS ( table.column, match_string, replace_string ) 
Match string

A match string may be begin with a ^ to invert the matching characters. The remaining characters either specify single characters or character ranges to remove. A character range is specified by the the lower and upper character, separated by dash (-).

NULL handling

If the value is NULL, the result is NULL as well. Additionally, strings with broken unicode characters at the end are mapped to NULL.

Examples

[1]

Swap ',' and '.'.

Query

Column1

         MAP_CHARACTERS ( "Table1"."Column1" , '.,' , ',.' )
        

Input

Output

Table1

Column1 : string

'33.333,33'

'44.444,44'

'55.555,55'

null

Result

Column1 : string

'33,333.33'

'44,444.44'

'55,555.55'

null

[2]

Replace numbers by alphanumeric characters.

Query

Column1

         MAP_CHARACTERS ( "Table1"."Column1" , '0-9' , 'A-J' )
        

Input

Output

Table1

Column1 : string

'00.000,00'

'11.111,11'

'99.999,99'

null

Result

Column1 : string

'AA.AAA,AA'

'BB.BBB,BB'

'JJ.JJJ,JJ'

null

See also: