Hi ,
Thanks for reaching out to Microsoft Q&A.
In synapse data flows (also known as mapping data flows), the lookup transformation only supports AND (&&
) conditions between match keys, it does not support OR (||
) logic directly.
This limitation means your attempted JSON/script update with ||
will not be accepted or function as expected. You cannot do a logical OR across match conditions within a single Lookup transformation
Approach 1: Use Two Lookups and Union
- Create two separate Lookup transformations:
- One that joins on
incoming_name_a == target_name_a
- Another that joins on
incoming_name_b == target_name_b
- One that joins on
- Use a Union transformation to combine the outputs of the two Lookups.
- Optionally add a Derived Column or Conditional Split if you need to de-duplicate or add metadata about which match condition was met.
Approach 2: Prejoin Using Derived Columns
If you want to avoid two lookups, another method is:
- Create a Derived Column that combines the 2incoming names into a single field with a known priority or structure.
Use this derived field as a single match key in your Lookup.
But this only works if the match logic can be standardized (a coalesce or priority-based name selection)
Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.