Using Connectors10% of the exam

Combining mid-flow lookups with the payload

How to fetch extra data mid-flow without losing the payload (a target on the operation or Flow Reference, Query Single for one record) and how to combine it in DataWeave with join, leftJoin, mergeWith, ++ and a filtered map, predicting each output exactly.

Official exam objective
Apply correct processors/syntax to retrieve and combine data in the middle of a flow, and predict outcomes.

~7 min read · 9 practice questions ·

What the exam expects

  • Retrieve data mid-flow (Database, HTTP, File or a referenced flow) while keeping the current payload, and say where the result lands.
  • Pick Query Single or Select for a lookup and predict what vars.x.name returns for each.
  • Combine the payload with the stored result using join, leftJoin, mergeWith, ++ or a filtered map, and predict the exact output.
  • Store a streamed lookup result so it is consumed promptly and can be used later.
  • Key terms: target variable (variable that receives an operation's result while the message passes on unchanged); Target Value (expression evaluated against the result before storing); join / leftJoin (pair array items by matching IDs into l/r objects); mergeWith (object merge where the right-hand key wins); dynamic element (parenthesised object or array of objects whose pairs are added to an enclosing object).

Key facts

Operation with a target
Detail
Passes on the same message it received
Target Value default
Detail
payload; #[message] stores payload and attributes
Flow Reference with a target
Detail
Payload and variable changes in the referenced flow revert
Query Single
Detail
Always one result, whatever the query matches
Selector on an array
Detail
Applies to all Object values inside the array, returning an array
join
Detail
Only matching pairs, keys l and r
leftJoin
Detail
Every left item; r only where matched
mergeWith shared key
Detail
Right-hand pair kept, left-hand pair removed
++ on objects
Detail
Combines all key-value pairs of both objects
Dynamic element
Detail
Parenthesised object or array of objects adds its pairs
Unconsumed stored stream
Detail
Holds connections until consumed or the event completes
Sources for this section (10)
  • Which approach does MuleSoft recommend over calling lookup() inside DataWeave, and what is lookup's status?
  • When should you choose leftJoin over join?
  • Why does leftJoin on the page's four users return five items?
  • What must a dynamic element's expression return?

The questions are free to read. Answers with their sources and self-grading are included with the pack.

Keep reading with the MuleSoft Developer pack

  • Core concepts
  • Exam traps
  • Worked scenario

The pack includes:

  • All 40 lessons of the MuleSoft Developer guide, with reading progress
  • Interactive decision walks and step-by-step sequence steppers
  • Practice exams purchase adds inline bank questions and topic practice (9 questions for this lesson)
  • An official source cited for every claim
  • An AI tutor that answers from the guide
  • Unlimited timed practice exams

Practice for the MuleSoft Developer exam