Skip to content

Label Map

Label Map (label-map)

Map string values to canonical labels using ordered rules.

Transform json

Minimal example

actions:
- label-map:
field: ""
JSON
{
"actions": [
{
"label-map": {
"field": ""
}
}
]
}

Contents

Fields

FieldTypeRequiredDescription
fieldfield (string)Field whose value will be mapped.
Examples: data_field
descriptionstringdescribe this step.
conditionlua-expression (string)Only run this action if the specified condition is met.
Examples: 2 * count()
rulesRules[]Ordered mapping rules.
default-labelstringLabel used when no rule matches.
output-fieldfield (string)Field that receives the mapped label (defaults to overwriting the source field).
Examples: data_field
case-sensitiveboolean (bool)Treat comparisons as case sensitive when true.

Schema

Rules - R Match Options

OptionNameTypeDescription
literalLiteralstringExact string match.
substringSubstringstringCase-insensitive substring match.
regexRegexstringRegular expression match.

Rules Fields

FieldTypeRequiredDescription
r-matchR MatchHow the input should be matched.
labelstringLabel applied when the rule matches.