Domain 8 of 12 ยท 10% of the official blueprint

Transforming Data with DataWeave practice lesson

Predict and implement DataWeave transformations for Northstar order and supplier representations.

What the published objective requires

  • Select output formats and coercions
  • Apply map, filter, orderBy and grouping functions
  • Package reusable functions in modules

The misconception to eliminate

Choosing functions from their English meaning without predicting the output type and shape.

Practice allocation: 6 of 60 questions in our whole-question mock blueprint.

Decision rules

Retrieve these without looking before attempting the question.

Rule 1

Separate the script header from the body with ---; output declares the writer MIME type.

Rule 2

map transforms each array item; filter retains items; groupBy changes the structure into keyed groups.

Rule 3

Use explicit coercion when the target type matters; default handles null or absent fallback values.

Rule 4

Extract reusable transformations into modules, but keep hidden synchronous flow calls deliberate.

Worked Northstar scenario

Scenario

Convert supplier CSV rows into JSON orders, keep only accepted rows and coerce quantity to Number.

Reasoning

Declare output application/json, filter by status, then map each row to the target object using quantity: $.quantity as Number. Predict the array shape before running.

Free practice question

Which expression returns the ids of every order in an array?

  1. payload filter $.id
  2. payload map $.id
  3. payload groupBy $.id
  4. payload orderBy $.id
Reveal answer and reasoning

Answer: B. map transforms each input item into the selected value, producing an array of ids.

The complete program contains five guided drills for this domain, an 80% mastery gate, saved progress and a separate 60-question timed mock.

Get Domain Mastery

Hands-on proof preview

Predict, run, investigate

Build the supplier-to-order mapping using the frozen sample data.

  1. Write the expected JSON array on paper first.
  2. Implement filter and map with explicit Number coercion.
  3. Run the transform against one missing optional field.
  4. Verify the actual output and explain every difference from the prediction.

Evidence to keep: Expected and actual JSON match for valid, rejected and missing-optional-field rows.

Primary sources

Questions about this domain

How much of the MuleSoft Developer exam is Transforming Data with DataWeave?

Salesforce publishes a weight of 10% for this domain. In a 60-question practice allocation, that is represented here by 6 questions.

Is this Transforming Data with DataWeave question from the real exam?

No. It is original independent practice material written only from public exam objectives and product documentation.