Hi ,
Thanks for reaching out to Microsoft Q&A.
Alright, you are almost there, but your conditional split expressions are wrongly assigned between Error Data and Good Data branches. You have swapped the logic, and that is why you are seeing error records in both branches.
Let me correct it :
First, you hae to understand:
hasError('AssertStream01')
returns true if there is an error in that Assert transformation.
You want bad data to go to "Reject" if any one assert has an error.
You want good data to go to "Accept" only if no asserts have any error.
Corrected one:
For 'Error Data' (Reject folder): If any assert has error, send it to Reject folder.
hasError('AssertStream01') == true() || hasError('AssertStream02') == true() || hasError('AssertStream03') == true() || hasError('AssertStream04') == true()
Why your current logic fails:
- You used
not(hasError())
for Error Data andhasError()
for Good Data. - That is completely reversed.
- Also, small but important, avoid extra == true() checks.
hasError()
already returns a boolean. No need to check== true()
.
Note:
In your conditional split, order matters.
Always put the Error Data rule first, then Good Data.
Because otherwise it may match wrong branch.
So, in the Conditional Split UI:
- First rule: If Error Data condition is true -> Go to "Reject"
- Second rule: Else If Good Data condition is true -> Go to "Accept"
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.