Skip to content

normalize

Normalises string fields in the payload.

Supported formats: json jsonl csv

Options

OptionTypeRequiredDescription
fieldsmapYesMap of field name to normalisation strategy

Strategies

StrategyEffect
lowerConvert to lowercase
upperConvert to uppercase
trimRemove leading and trailing whitespace
trim-leftRemove leading whitespace only
trim-rightRemove trailing whitespace only
collapse-spacesReplace runs of whitespace with a single space
capitalizeCapitalise the first letter of each word

Example

yaml
- normalize:
    fields:
      email: lower
      first_name: capitalize
      last_name: capitalize
      country: upper
      description: trim

Notes

  • Fields must exist in the payload. An error is returned if a configured field is missing.
  • Only string values are normalised. Non-string fields that exist are left unchanged.
  • Multiple strategies cannot be applied to a single field in one step. Chain two normalize steps if needed.

Released under the MIT License.