Data weave operators
Coerce to string
(':any', ':type') ⇒ ':string'
Any simple types can be coerced to string. If formatting is required
(such as for a number or date) the format schema property can be
used.
Date and number format schemas are based on Java
DateTimeFormatter and DecimalFormat.
Coerce to number
• (':string', ':type') ⇒ ':number'
• A string can be coerced to number. If the given
number has a specific format the schema
property can be used.
• Any format pattern accepted by
DecimalFormat is allowed.
output
Coerce a date to number
• (':time', ':type') ⇒ ':number'
• When coercing a date to a number, there is an
extra parameter you can add – 'unit' – to
specify what unit of time to use,
Coerce to date
• (':string', ':type')/(':number', ':type') ⇒ ':date'
• Date types can be coerced from string or
number.
• Any format pattern accepted by
DateTimeFormatter is allowed.
Transform
output
Flatten
•
(':array') ⇒ ':array'
If you have an array of arrays, this function can
flatten it into a single simple array.
Transform
Output
Split By
• (':string', ':string')/(':string', ':regex') ⇒ ':array'
• Performs the opposite operation as Join By. It
splits a string into an array of separate
elements, looking for instances of the
provided string and using it as a separator.
Transform
output

Dataweave types operators

  • 1.
    Data weave operators Coerceto string (':any', ':type') ⇒ ':string' Any simple types can be coerced to string. If formatting is required (such as for a number or date) the format schema property can be used. Date and number format schemas are based on Java DateTimeFormatter and DecimalFormat.
  • 3.
    Coerce to number •(':string', ':type') ⇒ ':number' • A string can be coerced to number. If the given number has a specific format the schema property can be used. • Any format pattern accepted by DecimalFormat is allowed.
  • 5.
  • 6.
    Coerce a dateto number • (':time', ':type') ⇒ ':number' • When coercing a date to a number, there is an extra parameter you can add – 'unit' – to specify what unit of time to use,
  • 8.
    Coerce to date •(':string', ':type')/(':number', ':type') ⇒ ':date' • Date types can be coerced from string or number. • Any format pattern accepted by DateTimeFormatter is allowed.
  • 9.
  • 10.
  • 11.
    Flatten • (':array') ⇒ ':array' Ifyou have an array of arrays, this function can flatten it into a single simple array.
  • 12.
  • 13.
  • 14.
    Split By • (':string',':string')/(':string', ':regex') ⇒ ':array' • Performs the opposite operation as Join By. It splits a string into an array of separate elements, looking for instances of the provided string and using it as a separator.
  • 15.
  • 16.