🐻An enhanced learning experience is coming soon! Registrations for expert-led classes will be paused temporarily from 11:00 PM PST on April 30, 2024, until 4:00 PM PST on May 6, 2024. Learn more. Need help with a class? Reach out to Trailhead Help.

Job Role

Architect, Developer


In-Person: 2 Full Day(s)
Virtual: 2 Full Day(s) or 4 Half Day(s)


Who should take this course?

This course is for Mule 4 developers or architects who want to advance their DataWeave skills beyond those taught in the Anypoint Platform Development: Fundamentals course so that they can build complex transformations.




When you complete this course, you will be able to:

  • Write generalized and reusable transformations using variables, functions, DataWeave modules.
  • Use the DataWeave Playground to test and author DataWeave code.
  • Build complex transformations from smaller testable steps.
  • Build more robust and testable functions and expressions using strong typing, match operators, error handling, and logging.
  • Create, transform, filter, combine, shuffle, select from, and reduce complex data structures that include nested arrays, objects, and arrays of objects.
  • Recursively replace or format every element or a list of elements in a nested schema.
  • Reduce arrays to other data structures or data types and calculate key performance indicators.

Class Registration

Lessons and Topics

Applying DataWeave fundamentals

  • Review and apply DataWeave fundamentals as learned in the Anypoint Platform Development: Fundamentals course
  • Set example input to preview DataWeave results in Anypoint Studio
  • Chain together two argument functions by using infix notation
  • Filter, order, and group elements of an object or array
  • Retype DataWeave expressions in the middle of code execution


Organizing an reusing DataWeave code

  • Organize DataWeave code into variables and functions
  • Enclose variables and functions in do statement scopes
  • Pass functions and lambda expressions as arguments to other DataWeave functions
  • Create and use reusable DataWeave modules


Writing more defensive and more robust DataWeave

  • Write more defensive DataWeave expressions that filter and route data based upon conditions
  • Write more robust functions using a match operator to test for data types
  • Handle and raise errors
  • Log from inside DataWeave expressions


Constructing arrays and objects

  • Add components to and remove elements from arrays and objects
  • Construct objects from lists of DataWeave expressions by using object constructor curly braces { }
  • Troubleshoot common issues when using object constructor curly braces { }


Iteratively mapping and joining arrays and objects

  • Combine objects and arrays into nested data structures by using map and mapObject functions
  • Extract an array of keys and/or values from an object by using the pluck function
  • Extract an array of keys and/or values from an object by using the DataWeave core Arrays module functions
  • Conditionally join together two nested schema by using the join function


Updating inside nested data structures

  • Conditionally update and mask parts of nested data structures
  • Format and transform nested data structures by using recursive functions


Reducing data from arrays

  • Conditionally test, count, and sum up elements of an array by using the DataWeave core Arrays module
  • Reduce and accumulate array elements to other output types by using the reduce function
  • Calculate key performance indicators from input collections by using the reduce function


Setup requirements


  • A computer with at least 8-16 GB available RAM (16 highly recommended), 2GHz CPU, and 10GB available storage
  • Internet access to port 80 (with > 5Mbps download and > 2Mbps upload)
  • Anypoint Studio 7.14.0 or later with embedded Mule runtime
  • Advanced REST Client (or any other REST client application)