The replacement mapping defines the special characters in the field values that need to be replaced in order to be sent. The mapping points at a certain replacement, which is defined separately. The attributes that need to be set in a replacement mapping are:
Attribute | Required | Description |
---|
from | Y | Defines the field name before mapping. |
to | Y | Defines the field name after mapping. |
precedence | N | Defines the precedence used when mapping. |
Function type | Y | Defines the function type of mapping. Needs to be "String functions". |
Function | Y | Defines the type of mapping. Needs to be "replacement". |
Replacement | Y | Defines the replacement to use. |
The replacement is defined separately. The attributes that need to be set in the replacement are:
Attribute | Required | Description |
---|
Replace | Y | Defines a field value character to be replaced. |
With | Y | Defines the field value character to replace with. |
The replacement maps replaces the characters in the value, while the mapping set maps the field names. The characters defined in the replacement table will be replaced.


In this example, the metric2influx_alphanumeric replacement is used to replace the special characters found in the field value that InfluxDB can't process. In this case, these characters are escaped with a backslash "\".